org.jboss.cache.optimistic
Class FqnComparator

java.lang.Object
  extended by org.jboss.cache.optimistic.FqnComparator
All Implemented Interfaces:
java.io.Serializable, java.util.Comparator

public class FqnComparator
extends java.lang.Object
implements java.util.Comparator, java.io.Serializable

Compares the order of two FQN.

Author:
Manik Surtani (manik@jboss.org), Steve Woodcock (stevew@jofti.com)
See Also:
Serialized Form

Constructor Summary
FqnComparator()
           
 
Method Summary
 int compare(java.lang.Object o1, java.lang.Object o2)
          Returns -1 if the first is shorter or first; 0 if they are the same; 1 if the second Fqn is shorter or first.
 
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
 

Constructor Detail

FqnComparator

public FqnComparator()
Method Detail

compare

public int compare(java.lang.Object o1,
                   java.lang.Object o2)
Returns -1 if the first is shorter or first; 0 if they are the same; 1 if the second Fqn is shorter or first. Orders first by ancestry, then by FQN string.

Specified by:
compare in interface java.util.Comparator


Copyright © 1998-2005 JBoss Inc . All Rights Reserved.