Class AssociationRoleComparator
- java.lang.Object
-
- net.ontopia.topicmaps.nav.utils.comparators.AssociationRoleComparator
-
- All Implemented Interfaces:
Comparator<AssociationRoleIF>
public class AssociationRoleComparator extends Object implements Comparator<AssociationRoleIF>
INTERNAL: A comparator for ordering AssociationRoleIFs alphabetically by role player and role type.
-
-
Field Summary
Fields Modifier and Type Field Description protected Comparator<TopicIF>
tc
-
Constructor Summary
Constructors Constructor Description AssociationRoleComparator()
AssociationRoleComparator(Collection<TopicIF> context, TopicIF sortTopic)
Constructor used to make a comparator which will compare Association Roles using the context provided.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(AssociationRoleIF ar1, AssociationRoleIF ar2)
Compares two AssociationRoleIFs.-
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, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Field Detail
-
tc
protected Comparator<TopicIF> tc
-
-
Constructor Detail
-
AssociationRoleComparator
public AssociationRoleComparator()
-
AssociationRoleComparator
public AssociationRoleComparator(Collection<TopicIF> context, TopicIF sortTopic)
Constructor used to make a comparator which will compare Association Roles using the context provided.- Parameters:
context
- The context to select topics in.sortTopic
- The topic representing sort names.
-
-
Method Detail
-
compare
public int compare(AssociationRoleIF ar1, AssociationRoleIF ar2)
Compares two AssociationRoleIFs.- Specified by:
compare
in interfaceComparator<AssociationRoleIF>
-
-