Package org.jboss.util
Class Null
- java.lang.Object
-
- org.jboss.util.Null
-
- All Implemented Interfaces:
java.io.Serializable
public final class Null extends java.lang.Object implements java.io.SerializableA class that represents null.VALUEis used to given an object variable a dual-mode nullified value, where null would indicate that the value is empty, andVALUEwould idicate that the value has been set to null (or something to that effect).- Version:
- $Revision$
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private static longserialVersionUIDThe serialVersionUIDstatic NullVALUEThe primary instance of Null.
-
Constructor Summary
Constructors Modifier Constructor Description privateNull()Do not allow public construction.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)Check if the given object is a Null instance or null.inthashCode()Returns zero.java.lang.StringtoString()Return a string representation.
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
The serialVersionUID- See Also:
- Constant Field Values
-
VALUE
public static final Null VALUE
The primary instance of Null.
-
-
Method Detail
-
toString
public java.lang.String toString()
Return a string representation.- Overrides:
toStringin classjava.lang.Object- Returns:
- Null
-
hashCode
public int hashCode()
Returns zero.- Overrides:
hashCodein classjava.lang.Object- Returns:
- Zero.
-
equals
public boolean equals(java.lang.Object obj)
Check if the given object is a Null instance or null.- Overrides:
equalsin classjava.lang.Object- Parameters:
obj- Object to test.- Returns:
- True if the given object is a Null instance or null.
-
-