Open DevShivmohan opened 2 years ago
mapping List<?>
List
private void searchFileViaSecretKey(File rootPath,CryptoSecretKeyDTO cryptoSecretKeyDTO){ File[] files=rootPath.listFiles(); Arrays.stream(files).forEach((file1 -> { if(file1.isDirectory()) searchFileViaSecretKey(rootPath,cryptoSecretKeyDTO); else if(cryptoSecretKeyDTO.getSecretKey().equals(file.getName().substring(0,36))){ this.file=file1; return; } })); }
FileUtils.forceDelete(new File(uri));
*_public static void main(String[] args) { List linkedList=new LinkedList<>();
for(int i=16;i<30;i++)
linkedList.add(new Test(i,"Shiv"+i));
System.out.println(linkedList);
// map are used to mapping these value to his value
linkedList.stream().map(t1->(t1.setId(t1.getId() 2))).collect(Collectors.toList()).forEach(System.out::println);
// filter are used to filter the object from list
List filtered= linkedList.stream().filter(t1->(t1.getId()>24 && t1.getName().equals("Shiv29"))).collect(Collectors.toList());
System.out.println(filtered);
filtered.forEach(System.out::println);
}_**