org.ceryle.tm
Class VariantComparator
java.lang.Object
org.ceryle.tm.VariantComparator
- All Implemented Interfaces:
- Comparator
public class VariantComparator
- extends Object
- implements Comparator
Provides a single utility method for comparing two Variants.
- Since:
- JDK1.4
- Version:
- $Id: VariantComparator.java,v 3.3 2007-06-15 12:09:33 altheim Exp $
- Author:
- Murray Altheim
|
Method Summary |
int |
compare(Object o1,
Object o2)
Compares two Variant objects on their signature. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VariantComparator
public VariantComparator()
compare
public int compare(Object o1,
Object o2)
- Compares two Variant objects on their signature.
Two Variants with the same variant names (inline or Locator)
and the same parameters will compare as equal. Two Variants
with different variant names will compare on the lexical
order of the variant name coupled with their parameters.
Two Variants with the same variant name but different parameters
will sort in an arbitrary but consistent order.
- Specified by:
compare in interface Comparator
The Ceryle Project. Copyright ©2001-2007 Murray Altheim, All Rights Reserved. See LICENSE included with distribution.