
com.github.geekonjava.query.order.OrderCriteria Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of Purify4J Show documentation
Show all versions of Purify4J Show documentation
Simple library for use to refine the Java Collection Objects
The newest version!
package com.github.geekonjava.query.order;
import java.util.Collections;
import java.util.List;
public class OrderCriteria {
private final String method;
private final Order order;
public OrderCriteria(String method, Order order) {
this.method = method;
this.order = order;
}
public List sort(List list) {
Collections.sort(list, new OrderComparator(method));
if (order == Order.DESC) {
Collections.reverse(list);
}
return list;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy