com.metamatrix.common.object
Class ConfigurationPropertyObjDisplayComparator

java.lang.Object
  extended by com.metamatrix.common.object.ConfigurationPropertyObjDisplayComparator
All Implemented Interfaces:
java.util.Comparator

public class ConfigurationPropertyObjDisplayComparator
extends java.lang.Object
implements java.util.Comparator

This class serves as a name-based comparator of MetaObject instances. Normal equality and comparison of MetaObject instances is solely based upon the global identifier. This class provides a means of comparing two metadata entities based solely upon their full name.


Constructor Summary
ConfigurationPropertyObjDisplayComparator()
           
 
Method Summary
 int compare(java.lang.Object obj1, java.lang.Object obj2)
          Compares the two arguments for order.
 boolean equals(java.lang.Object obj)
          Returns true if the specified object is semantically equal to this comparator instance.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurationPropertyObjDisplayComparator

public ConfigurationPropertyObjDisplayComparator()
Method Detail

compare

public final int compare(java.lang.Object obj1,
                         java.lang.Object obj2)
Compares the two arguments for order. Returns a negative integer, zero, or a positive integer as this first object's name is lexicographically less than, equal to, or greater than (respectively) the second object's name. If the two objects are not instances of MetaObject, this method throws a ClassCastException.

Specified by:
compare in interface java.util.Comparator
Parameters:
obj1 - the first MetaObject instance to be compared
obj2 - the second MetaObject instance to be compared
Returns:
a negative integer, zero, or a positive integer as this first object's name is lexicographically less than, equal to, or greater than (respectively) the second object's name.
Throws:
java.lang.IllegalArgumentException - if the specified object reference is null
java.lang.ClassCastException - if the specified objects' types prevent them from being compared by this comparator.

equals

public boolean equals(java.lang.Object obj)
Returns true if the specified object is semantically equal to this comparator instance.

Specified by:
equals in interface java.util.Comparator
Overrides:
equals in class java.lang.Object
Parameters:
obj - the object that this instance is to be compared to.
Returns:
whether the object is equal to this object.


Copyright © 2009. All Rights Reserved.