org.nakedobjects.metamodel.facets.ordering.memberorder
Class MemberOrderComparator
java.lang.Object
org.nakedobjects.metamodel.facets.ordering.memberorder.MemberOrderComparator
- All Implemented Interfaces:
- java.util.Comparator
public class MemberOrderComparator
- extends java.lang.Object
- implements java.util.Comparator
Compares by MemberOrderFacet obtained from each NakedObjectMemberPeer).
Will also compare OrderSets; these are put after any NakedObjectMemberPeers. If there is
more than one OrderSet then these are compared by an OrderSetGroupNameComparator.
If there is no annotation on either member, then will compare the members by name instead.
Can specify if requires that members are in the same (group) name.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.Comparator |
equals |
MemberOrderComparator
public MemberOrderComparator(boolean ensureGroupIsSame)
- Parameters:
ensureGroupIsSame -
compare
public int compare(java.lang.Object o1,
java.lang.Object o2)
- Specified by:
compare in interface java.util.Comparator
compare
public int compare(NakedObjectMemberPeer o1,
NakedObjectMemberPeer o2)
Copyright © 2001-2009 Naked Objects Group Ltd.. All Rights Reserved.