Class PDAttributeObject

    • Constructor Detail

      • PDAttributeObject

        public PDAttributeObject()
        Default constructor.
      • PDAttributeObject

        public PDAttributeObject​(COSDictionary dictionary)
        Creates a new attribute object with a given dictionary.
        Parameters:
        dictionary - the dictionary
    • Method Detail

      • create

        public static PDAttributeObject create​(COSDictionary dictionary)
        Creates an attribute object.
        Parameters:
        dictionary - the dictionary
        Returns:
        the attribute object
      • getStructureElement

        private PDStructureElement getStructureElement()
        Gets the structure element.
        Returns:
        the structure element
      • setStructureElement

        protected void setStructureElement​(PDStructureElement structureElement)
        Sets the structure element.
        Parameters:
        structureElement - the structure element
      • getOwner

        public java.lang.String getOwner()
        Returns the owner of the attributes.
        Returns:
        the owner of the attributes
      • setOwner

        protected void setOwner​(java.lang.String owner)
        Sets the owner of the attributes.
        Parameters:
        owner - the owner of the attributes
      • isEmpty

        public boolean isEmpty()
        Detects whether there are no properties in the attribute object.
        Returns:
        true if the attribute object is empty, false otherwise
      • potentiallyNotifyChanged

        protected void potentiallyNotifyChanged​(COSBase oldBase,
                                                COSBase newBase)
        Notifies the attribute object change listeners if the attribute is changed.
        Parameters:
        oldBase - old value
        newBase - new value
      • isValueChanged

        private boolean isValueChanged​(COSBase oldValue,
                                       COSBase newValue)
        Is the value changed?
        Parameters:
        oldValue - old value
        newValue - new value
        Returns:
        true if the value is changed, false otherwise
      • notifyChanged

        protected void notifyChanged()
        Notifies the attribute object change listeners about a change in this attribute object.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • arrayToString

        protected static java.lang.String arrayToString​(java.lang.Object[] array)
        Creates a String representation of an Object array.
        Parameters:
        array - the Object array
        Returns:
        the String representation
      • arrayToString

        protected static java.lang.String arrayToString​(float[] array)
        Creates a String representation of a float array.
        Parameters:
        array - the float array
        Returns:
        the String representation