Package org.zkoss.zul
Interface GroupComparator<D>

 All Superinterfaces:
java.util.Comparator<D>
public interface GroupComparator<D> extends java.util.Comparator<D>
A comparison function used to compare the group order of two objects, and the order of them in the group if they belongs to the same group.To know whether two objects is in the same group,
compareGroup(D, D)
is invoked. If zero is returned, it implies they are in the same group, and thenComparator.compare(T, T)
is used to compare the order in the group.Comparator.compare(T, T)
won't be called if they don't belong to the same group. Since:
 3.5.0
 Author:
 tomyeh


Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
compareGroup(D o1, D o2)
Compares if the two arguments is in the same group.



Method Detail

compareGroup
int compareGroup(D o1, D o2)
Compares if the two arguments is in the same group. compareGroup(x, y) == 0 implies x and y is in the same group.
 compareGroup(x, y) > 0 implies x and y is in a different group and the order of x's group is larger than that of y's group.
 compareGroup(x, y) < 0 implies x and y is in a different group and the order of x's group is less than that of y's group.

