ix.util
Class UniqueObject
java.lang.Object
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
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
name
protected java.lang.String name
UniqueObject
public UniqueObject(java.lang.String name)
UniqueObject
public UniqueObject()
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