|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.topicmapslab.majortom.comparator.RoleComparator
public class RoleComparator
association role comparator
Field Summary | |
---|---|
private boolean |
ascending
|
private static RoleComparator |
instanceAsc
|
private static RoleComparator |
instanceDesc
|
Constructor Summary | |
---|---|
private |
RoleComparator(boolean ascending)
constructor |
Method Summary | |
---|---|
int |
compare(org.tmapi.core.Role o1,
org.tmapi.core.Role o2)
Compare two association items. |
static RoleComparator |
getInstance(boolean ascending)
Returns the singleton instance of the comparator |
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 |
Field Detail |
---|
private static RoleComparator instanceAsc
private static RoleComparator instanceDesc
private final boolean ascending
Constructor Detail |
---|
private RoleComparator(boolean ascending)
ascending
- sorting order ascending?Method Detail |
---|
public static RoleComparator getInstance(boolean ascending)
ascending
- sorting order ascending?
public int compare(org.tmapi.core.Role o1, org.tmapi.core.Role o2)
Return 0
if both associations roles have the same type and
player (lexicographical comparison of identities).
Return -1
if the type or player of the first role is higher
(lexicographical comparison of identities).
Return 1
if the type or player of the second role is higher
(lexicographical comparison of identities).
compare
in interface java.util.Comparator<org.tmapi.core.Role>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |