Package com.dd.plist
Class NSNull
java.lang.Object
com.dd.plist.NSObject
com.dd.plist.NSNull
- All Implemented Interfaces:
Cloneable,Comparable<NSObject>
Internally used representation of the null value for storing it inside dictionaries and sets.
-
Field Summary
FieldsFields inherited from class com.dd.plist.NSObject
ASCII_LINE_LENGTH, NEWLINE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Creates and returns a deep copy of this instance.intbooleanprotected voidtoASCII(StringBuilder ascii, int level) Generates the ASCII representation of this object.protected voidtoASCIIGnuStep(StringBuilder ascii, int level) Generates the ASCII representation of this object in the GnuStep format.(package private) voidGenerates the binary representation of the object.Converts this NSObject into an equivalent object of the Java Runtime Environment.(package private) voidtoXML(StringBuilder xml, int level) Generates the XML representation of the object (without XML headers or enclosing plist-tags).protected static NSObjectReturns the specified NSObject if it is not a NSNull instance, or null otherwise.protected static NSObjectReturns the specified NSObject if it is not null, or a NSNull instance otherwise.Methods inherited from class com.dd.plist.NSObject
assignIDs, fromJavaObject, indent, toJavaObject, toXMLPropertyList
-
Field Details
-
NULL
-
-
Constructor Details
-
NSNull
private NSNull()
-
-
Method Details
-
wrap
Returns the specified NSObject if it is not null, or a NSNull instance otherwise.- Parameters:
o- The object.- Returns:
- The non-null object, or a NSNull instance.
-
unwrap
Returns the specified NSObject if it is not a NSNull instance, or null otherwise.- Parameters:
o- The object.- Returns:
- The non-null object, or null.
-
clone
Description copied from class:NSObjectCreates and returns a deep copy of this instance. -
toJavaObject
Description copied from class:NSObjectConverts this NSObject into an equivalent object of the Java Runtime Environment.NSArrayobjects are converted to arrays.NSDictionaryobjects are converted to objects extending theMapclass.NSSetobjects are converted to objects extending theSetclass.NSNumberobjects are converted to primitive number values (int, long, double or boolean).NSStringobjects are converted toStringobjects.NSDataobjects are converted to byte arrays.NSDateobjects are converted toDateobjects.UIDobjects are converted to byte arrays.
- Specified by:
toJavaObjectin classNSObject- Returns:
- A native java object representing this NSObject's value.
-
toXML
Description copied from class:NSObjectGenerates the XML representation of the object (without XML headers or enclosing plist-tags).- Specified by:
toXMLin classNSObject- Parameters:
xml- TheStringBuilderonto which the XML representation is appended.level- The indentation level of the object.
-
toBinary
Description copied from class:NSObjectGenerates the binary representation of the object.- Specified by:
toBinaryin classNSObject- Parameters:
out- The output stream to serialize the object to.- Throws:
IOException- If an I/O error occurs while writing to the stream or the object structure contains data that cannot be saved.
-
toASCII
Description copied from class:NSObjectGenerates the ASCII representation of this object. The generated ASCII representation does not end with a newline. Complies with the Old-Style ASCII Property Lists definition.- Specified by:
toASCIIin classNSObject- Parameters:
ascii- TheStringBuilderonto which the ASCII representation is appended.level- The indentation level of the object.
-
toASCIIGnuStep
Description copied from class:NSObjectGenerates the ASCII representation of this object in the GnuStep format. The generated ASCII representation does not end with a newline.- Specified by:
toASCIIGnuStepin classNSObject- Parameters:
ascii- TheStringBuilderonto which the ASCII representation is appended.level- The indentation level of the object.
-
equals
-
compareTo
-