net.wotonomy.control
Class EONullValue

java.lang.Object
  extended by net.wotonomy.control.EONullValue
All Implemented Interfaces:
java.io.Serializable

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

EONullValue is used to represent null in Collections classes because List and Map do not specify whether null values are allowed and because NSArray and NSDictionary explicitly do not allow null values.

Use of the static singleton method nullValue() is required by this implementation because Java cannot return a singleton instance from a constructor.

This implementation duplicates NSNull, but the singleton instances are of course different. Be careful. I have no idea why this class was even created, given that NSNull exists.

Version:
$Revision: 894 $
Author:
michael@mpowers.net, $Author: cgruber $
See Also:
Serialized Form

Method Summary
 boolean equals(java.lang.Object anObject)
          Implemented to return true for any instance of EONullValue and for any instance of NSNull.
 int hashCode()
          Hashcode of all instances is zero.
static EONullValue nullValue()
          Constructor specifying name and object.
 java.lang.String toString()
          Returns a human-readable string representation.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

nullValue

public static EONullValue nullValue()
Constructor specifying name and object.


toString

public java.lang.String toString()
Returns a human-readable string representation.

Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Hashcode of all instances is zero.

Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object anObject)
Implemented to return true for any instance of EONullValue and for any instance of NSNull.

Overrides:
equals in class java.lang.Object


Copyright © 2006 null. All Rights Reserved.