org.infinispan.tree
Class FqnComparator

java.lang.Object
  extended by 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

Field Summary
static FqnComparator INSTANCE
           
 
Constructor Summary
FqnComparator()
           
 
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
 
Methods inherited from interface java.util.Comparator
equals
 

Field Detail

INSTANCE

public static final FqnComparator INSTANCE
Constructor Detail

FqnComparator

public FqnComparator()
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 interface Comparator<Fqn>

Google Analytics

Copyright © 2010 JBoss, a division of Red Hat. All Rights Reserved.