Module org.sejda.sambox
Class PDAttributeObject
java.lang.Object
org.sejda.sambox.pdmodel.common.PDDictionaryWrapper
org.sejda.sambox.pdmodel.documentinterchange.logicalstructure.PDAttributeObject
- All Implemented Interfaces:
COSObjectable
- Direct Known Subclasses:
PDDefaultAttributeObject,PDStandardAttributeObject,PDUserAttributeObject
An attribute object.
- Author:
- Johannes Koch
-
Constructor Summary
ConstructorsConstructorDescriptionPDAttributeObject(COSDictionary dictionary) Creates a new attribute object with a given dictionary. -
Method Summary
Modifier and TypeMethodDescriptionprotected static StringarrayToString(float[] array) Creates a String representation of a float array.protected static StringarrayToString(Object[] array) Creates a String representation of an Object array.static PDAttributeObjectcreate(COSDictionary dictionary) Creates an attribute object.getOwner()Returns the owner of the attributes.booleanisEmpty()Detects whether there are no properties in the attribute object.protected voidNotifies the attribute object change listeners about a change in this attribute object.protected voidpotentiallyNotifyChanged(COSBase oldBase, COSBase newBase) Notifies the attribute object change listeners if the attribute is changed.protected voidSets the owner of the attributes.protected voidsetStructureElement(PDStructureElement structureElement) Sets the structure element.toString()Methods inherited from class org.sejda.sambox.pdmodel.common.PDDictionaryWrapper
equals, getCOSObject, hashCode
-
Constructor Details
-
PDAttributeObject
public PDAttributeObject() -
PDAttributeObject
Creates a new attribute object with a given dictionary.- Parameters:
dictionary- the dictionary
-
-
Method Details
-
create
Creates an attribute object.- Parameters:
dictionary- the dictionary- Returns:
- the attribute object
-
setStructureElement
Sets the structure element.- Parameters:
structureElement- the structure element
-
getOwner
Returns the owner of the attributes.- Returns:
- the owner of the attributes
-
setOwner
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:
trueif the attribute object is empty,falseotherwise
-
potentiallyNotifyChanged
Notifies the attribute object change listeners if the attribute is changed.- Parameters:
oldBase- old valuenewBase- new value
-
notifyChanged
protected void notifyChanged()Notifies the attribute object change listeners about a change in this attribute object. -
toString
-
arrayToString
Creates a String representation of an Object array.- Parameters:
array- the Object array- Returns:
- the String representation
-
arrayToString
Creates a String representation of a float array.- Parameters:
array- the float array- Returns:
- the String representation
-