org.infinispan.tree
Class FqnComparator
java.lang.Object
org.infinispan.tree.FqnComparator
- All Implemented Interfaces:
- Serializable, Comparator<Fqn>
@Immutable
public class FqnComparator
- extends Object
- implements Comparator<Fqn>, Serializable
Compares the order of two FQN. Sorts by name, then by depth, e.g.
aaa/bbb
xxx
xxx/ccc
- Since:
- 4.0
- Author:
- Manik Surtani (manik@jboss.org), Steve Woodcock (stevew@jofti.com)
- See Also:
- Serialized Form
Method Summary |
int |
compare(Fqn fqn1,
Fqn fqn2)
Returns -1 if the first comes before; 0 if they are the same; 1 if the second Fqn comes before. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INSTANCE
public static final FqnComparator INSTANCE
FqnComparator
public FqnComparator()
compare
public int compare(Fqn fqn1,
Fqn fqn2)
- Returns -1 if the first comes before; 0 if they are the same; 1 if the second Fqn comes before.
null
always comes first.
- Specified by:
compare
in interface Comparator<Fqn>
Copyright © 2011 JBoss, a division of Red Hat. All Rights Reserved.