All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.roguewave.vsj.streamer.CollectableCompare

java.lang.Object
   |
   +----com.roguewave.vsj.streamer.CollectableCompare

public class CollectableCompare
extends Object
implements Comparator
Class CollectableCompare implements the Comparator interface to match, as best we can in Java, the identity comparison semantics of the RWCollectable::compareTo() in Tools.h++. The objects are compared via their hash codes, which, of course, are not guaranteed to be unique for unique objects. Thus, the primary utility of this class is to have something to return from the DefineCollectable.getComparator() method when mapping Java classes for which there are not more useful comparators available.

See Also:
DefineCollectable

Constructor Index

 o CollectableCompare()

Method Index

 o compare(Object, Object)
Compares two Objects using their hash codes.

Constructors

 o CollectableCompare
 public CollectableCompare()

Methods

 o compare
 public int compare(Object a,
                    Object b)
Compares two Objects using their hash codes.

Returns:
a.hashCode() - b.hashCode()

All Packages  Class Hierarchy  This Package  Previous  Next  Index