Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class CriteriaGroup {
- // ... other stuff about the class
- public List<Criterion> getSortedCriteria() {
- // makes a list copy of the criteria
- List<Criterion> criteria = new ArrayList<Criterion>(this.criteria);
- // sorts the criteria using their compareTo method (from Comparable)
- Collections.sort(criteria);
- return criteria;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement