Class UniqueObject

  extended bycom.virtuosotechnologies.lib.base.UniqueObject
Direct Known Subclasses:
BasicEnumeratedType, PlatformEvent.Type, SearchBodyPredicateSemantics.PartConstraint, SearchParameters.PositionConstraint, UniqueClassConstrainedKey

public class UniqueObject
extends Object

An object whose equals() method is guaranteed to use reference equality. That is it does not equal any other object.

The description string is used for toString(). If you pass null for the description or do not provide one, UniqueObject will automatically generate a default string.

Constructor Summary
          Default constructor with no description.
UniqueObject(String description)
          Construct a UniqueObject with a description
Method Summary
 boolean equals(Object obj)
          Equals method.
 long getUniqueObjectID()
          Return a unique ID for this unique object.
 String toString()
          Return string description.
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Detail


public UniqueObject()
Default constructor with no description. Causes toString() to return an automatically-generated default description string.


public UniqueObject(String description)
Construct a UniqueObject with a description

description - description string for toString(). It is okay to pass null, in which case toString() will return an automatically-generated default string.
Method Detail


public final long getUniqueObjectID()
Return a unique ID for this unique object. Final.

the unique id as a long integer


public final String toString()
Return string description. Final so it cannot be overridden.


public final boolean equals(Object obj)
Equals method. We make this final so it cannot be overridden, to enforce the contract that all UniqueObjects use reference equality.