ix.util
Class UniqueObject

java.lang.Object
  extended by ix.util.UniqueObject
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
LispInterpreter.JavaNull

public class UniqueObject
extends java.lang.Object
implements java.io.Serializable

Objects used just to be distinct from other objects. It's often better to use an Object, rather than null, to indicate "not found" or similar, because so many things can produce a null that it can be difficult to find what produced one when something goes wrong. UniqueObjects have a name that appears in output which is intended to make them easier to identify than a plain Object would be. Each UniqueObject also has a number that appears along with the name in the toString() result.

See Also:
Serialized Form

Field Summary
protected  java.lang.String name
           
 
Constructor Summary
UniqueObject()
           
UniqueObject(java.lang.String name)
           
 
Method Summary
 java.lang.String getName()
           
 void setName(java.lang.String name)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

protected java.lang.String name
Constructor Detail

UniqueObject

public UniqueObject(java.lang.String name)

UniqueObject

public UniqueObject()
Method Detail

getName

public java.lang.String getName()

setName

public void setName(java.lang.String name)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object