Advertisement
Guest User

Untitled

a guest
Jul 9th, 2014
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.36 KB | None | 0 0
  1. public class CriteriaGroup {
  2.  
  3.     // ... other stuff about the class
  4.  
  5.     public List<Criterion> getSortedCriteria() {
  6.         // makes a list copy of the criteria
  7.         List<Criterion> criteria = new ArrayList<Criterion>(this.criteria);
  8.  
  9.         // sorts the criteria using their compareTo method (from Comparable)
  10.         Collections.sort(criteria);
  11.  
  12.         return criteria;
  13.     }  
  14.  
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement