PATH Documentation > WebObjects

Table of Contents

NSKeyValueCoding.Null


Inherits from:
Object
Implements:
Serializable
Cloneable
NSCoding
Package:
com.webobjects.foundation


Class Description


NSKeyValueCoding.Null is a final class that defines a unique object used to represent null values in collection objects, such as NSArrays, which don't allow null values.

For instance, Enterprise Objects Framework uses NSKeyValueCoding.Null to represent null values from database rows in its database level snapshots (NSDictionary objects). However, Enterprise Objects Framework automatically translates NSKeyValueCoding.Null to null in enterprise objects, so you should rarely need to write code that accounts for this class.

Whenever null is represented by NSKeyValueCoding.Null, it should be represented with the instance stored in the NSKeyValueCoding constant, NullValue. You can safely use this instance with the == operator to test for the presence of a null value:


if (value == NSKeyValueCoding.NullValue) {
    /* ... */
}




Interfaces Implemented


NSCoding
classForCoder
encodeWithCoder
Cloneable
clone


Static Methods



decodeObject

public static Object decodeObject(NSCoder aNSCoder)

Returns the shared instance of NSKeyValueCoding.Null stored in the NSKeyValueCoding constant NullValue.

See Also: NSCoding Interface Description




Instance Methods



classForCoder

public Class classForCoder()

Conformance to NSCoding. See the method description for classForCoder in the NSCoding interface specification.

clone

public Object clone()

Simply returns the shared instance of NSKeyValueCoding.Null stored in the constant NullValue.

encodeWithCoder

public void encodeWithCoder(NSCoder aNSCoder)

Conformance to NSCoding. See the method description for encodeWithCoder in the NSCoding interface specification.

toString

public String toString()

Returns a string representation of the receiver.

© 2001 Apple Computer, Inc. (Last Published April 17, 2001)


Table of Contents