In the method I need to implement sorting of the List using an object of the Sort class, but I did it using the usual sort method, but this does not work, explain and show me how to sort correctly using the object of the Sort class

public Iterable<PObject> findAll(Sort sort) { if (Boolean.TRUE) { throw new NotImplementedException("Not implemented yet"); } ObjectMapper objectMapper = new ObjectMapper(); List pObjectList = null; try { pObjectList = objectMapper.readValue(file, List.class); if (sort != null) { Collections.sort(pObjectList); } } catch (IOException e) { e.printStackTrace(); } return pObjectList; 
  • Does this class have sorting functions? According to this class is sorting? More specifics - GenCloud
  • The question is not the topic: and in which case the NotImplementedException exception will not be generated in your code? - post_zeew Nov.
  • I need to use the Sort class to sort by examples from here programcreek.com/java-api-examples/… but I don’t understand yet how - Alexandr Romanovskij
  • I don’t know about the exception, I didn’t understand it, but it is necessary - Alexandr Romanovskij
  • I have sort here as an option with the help of which I have to sort through - Alexandr Romanovskij

0