Package org.infinispan.tree.impl
Class FqnComparator
- java.lang.Object
-
- org.infinispan.tree.impl.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
-
-
Field Summary
Fields Modifier and Type Field Description static FqnComparator
INSTANCE
-
Constructor Summary
Constructors Constructor Description FqnComparator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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
-
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Field Detail
-
INSTANCE
public static final FqnComparator INSTANCE
-
-
Method Detail
-
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 interfaceComparator<Fqn>
-
-