List<File> ObservableList<ResourceFiles>
List<File> fileList = fileChooser.showOpenMultipleDialog(mainApp.getPrimaryStage());
if (fileList != null) {
ObservableList<ResourceFiles> temp = fileList.stream().map(ResourceFiles :: new).collect(Collectors.toList());
resourceFilesList.setAll( temp);
}
class B{
B(A a){}
public List<B> listConstructor(List<A> aList){
List<B> bList = new ArrayList<>();
for (int i=0;i<aList.size();i++)
{
bList.add(new B(aList.get(i)));
}
return bList;
}
}
List<File> fileList = fileChooser.showOpenMultipleDialog(mainApp.getPrimaryStage());
if (fileList != null) {
//List<B> bList = aList.stream().map(B::new).collect(Collectors.toList());
ObservableList<ResourceFiles> temp = fileList.stream().map(ResourceFiles :: new).collect(Collectors.toList());
resourceFilesList.setAll( temp);
}