Package com.dd.plist
Class NSNull
- java.lang.Object
-
- com.dd.plist.NSObject
-
- com.dd.plist.NSNull
-
-
Field Summary
Fields Modifier and Type Field Description private static NSNullNULL-
Fields inherited from class com.dd.plist.NSObject
ASCII_LINE_LENGTH, NEWLINE
-
-
Constructor Summary
Constructors Modifier Constructor Description privateNSNull()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description NSObjectclone()Creates and returns a deep copy of this instance.intcompareTo(NSObject o)booleanequals(java.lang.Object obj)protected voidtoASCII(java.lang.StringBuilder ascii, int level)Generates the ASCII representation of this object.protected voidtoASCIIGnuStep(java.lang.StringBuilder ascii, int level)Generates the ASCII representation of this object in the GnuStep format.(package private) voidtoBinary(BinaryPropertyListWriter out)Generates the binary representation of the object.java.lang.ObjecttoJavaObject()Converts this NSObject into an equivalent object of the Java Runtime Environment.(package private) voidtoXML(java.lang.StringBuilder xml, int level)Generates the XML representation of the object (without XML headers or enclosing plist-tags).protected static NSObjectunwrap(NSObject o)Returns the specified NSObject if it is not a NSNull instance, or null otherwise.protected static NSObjectwrap(NSObject o)Returns 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 Detail
-
NULL
private static final NSNull NULL
-
-
Method Detail
-
wrap
protected static NSObject wrap(NSObject o)
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
protected static NSObject unwrap(NSObject o)
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
public NSObject clone()
Description copied from class:NSObjectCreates and returns a deep copy of this instance.
-
toJavaObject
public java.lang.Object 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
void toXML(java.lang.StringBuilder xml, int level)Description copied from class:NSObjectGenerates the XML representation of the object (without XML headers or enclosing plist-tags).
-
toBinary
void toBinary(BinaryPropertyListWriter out) throws java.io.IOException
Description copied from class:NSObjectGenerates the binary representation of the object.
-
toASCII
protected void toASCII(java.lang.StringBuilder ascii, int level)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.
-
toASCIIGnuStep
protected void toASCIIGnuStep(java.lang.StringBuilder ascii, int level)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
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
compareTo
public int compareTo(NSObject o)
-
-