Package com.dd.plist

Class NSNull

  • All Implemented Interfaces:
    java.lang.Cloneable, java.lang.Comparable<NSObject>

    public final class NSNull
    extends NSObject
    Internally used representation of the null value for storing it inside dictionaries and sets.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private NSNull()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      NSObject clone()
      Creates and returns a deep copy of this instance.
      int compareTo​(NSObject o)  
      boolean equals​(java.lang.Object obj)  
      protected void toASCII​(java.lang.StringBuilder ascii, int level)
      Generates the ASCII representation of this object.
      protected void toASCIIGnuStep​(java.lang.StringBuilder ascii, int level)
      Generates the ASCII representation of this object in the GnuStep format.
      (package private) void toBinary​(BinaryPropertyListWriter out)
      Generates the binary representation of the object.
      java.lang.Object toJavaObject()
      Converts this NSObject into an equivalent object of the Java Runtime Environment.
      (package private) void toXML​(java.lang.StringBuilder xml, int level)
      Generates the XML representation of the object (without XML headers or enclosing plist-tags).
      protected static NSObject unwrap​(NSObject o)
      Returns the specified NSObject if it is not a NSNull instance, or null otherwise.
      protected static NSObject wrap​(NSObject o)
      Returns the specified NSObject if it is not null, or a NSNull instance otherwise.
      • Methods inherited from class java.lang.Object

        finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • NULL

        private static final NSNull NULL
    • Constructor Detail

      • NSNull

        private NSNull()
    • 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: NSObject
        Creates and returns a deep copy of this instance.
        Specified by:
        clone in class NSObject
        Returns:
        A clone of this instance.
      • toJavaObject

        public java.lang.Object toJavaObject()
        Description copied from class: NSObject
        Converts this NSObject into an equivalent object of the Java Runtime Environment.
        • NSArray objects are converted to arrays.
        • NSDictionary objects are converted to objects extending the Map class.
        • NSSet objects are converted to objects extending the Set class.
        • NSNumber objects are converted to primitive number values (int, long, double or boolean).
        • NSString objects are converted to String objects.
        • NSData objects are converted to byte arrays.
        • NSDate objects are converted to Date objects.
        • UID objects are converted to byte arrays.
        Specified by:
        toJavaObject in class NSObject
        Returns:
        A native java object representing this NSObject's value.
      • toXML

        void toXML​(java.lang.StringBuilder xml,
                   int level)
        Description copied from class: NSObject
        Generates the XML representation of the object (without XML headers or enclosing plist-tags).
        Specified by:
        toXML in class NSObject
        Parameters:
        xml - The StringBuilder onto which the XML representation is appended.
        level - The indentation level of the object.
      • toBinary

        void toBinary​(BinaryPropertyListWriter out)
               throws java.io.IOException
        Description copied from class: NSObject
        Generates the binary representation of the object.
        Specified by:
        toBinary in class NSObject
        Parameters:
        out - The output stream to serialize the object to.
        Throws:
        java.io.IOException - If an I/O error occurs while writing to the stream or the object structure contains data that cannot be saved.
      • toASCII

        protected void toASCII​(java.lang.StringBuilder ascii,
                               int level)
        Description copied from class: NSObject
        Generates 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:
        toASCII in class NSObject
        Parameters:
        ascii - The StringBuilder onto which the ASCII representation is appended.
        level - The indentation level of the object.
      • toASCIIGnuStep

        protected void toASCIIGnuStep​(java.lang.StringBuilder ascii,
                                      int level)
        Description copied from class: NSObject
        Generates the ASCII representation of this object in the GnuStep format. The generated ASCII representation does not end with a newline.
        Specified by:
        toASCIIGnuStep in class NSObject
        Parameters:
        ascii - The StringBuilder onto which the ASCII representation is appended.
        level - The indentation level of the object.
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • compareTo

        public int compareTo​(NSObject o)