Class PDDefaultAttributeObject
- java.lang.Object
-
- org.apache.pdfbox.pdmodel.common.PDDictionaryWrapper
-
- org.apache.pdfbox.pdmodel.documentinterchange.logicalstructure.PDAttributeObject
-
- org.apache.pdfbox.pdmodel.documentinterchange.logicalstructure.PDDefaultAttributeObject
-
- All Implemented Interfaces:
COSObjectable
public class PDDefaultAttributeObject extends PDAttributeObject
A default attribute object.
-
-
Constructor Summary
Constructors Constructor Description PDDefaultAttributeObject()
Default constructor.PDDefaultAttributeObject(COSDictionary dictionary)
Creates a default attribute object with a given dictionary.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.String>
getAttributeNames()
Gets the attribute names.COSBase
getAttributeValue(java.lang.String attrName)
Gets the attribute value for a given name.protected COSBase
getAttributeValue(java.lang.String attrName, COSBase defaultValue)
Gets the attribute value for a given name.void
setAttribute(java.lang.String attrName, COSBase attrValue)
Sets an attribute.java.lang.String
toString()
-
Methods inherited from class org.apache.pdfbox.pdmodel.documentinterchange.logicalstructure.PDAttributeObject
arrayToString, arrayToString, create, getOwner, isEmpty, notifyChanged, potentiallyNotifyChanged, setOwner, setStructureElement
-
Methods inherited from class org.apache.pdfbox.pdmodel.common.PDDictionaryWrapper
equals, getCOSObject, hashCode
-
-
-
-
Constructor Detail
-
PDDefaultAttributeObject
public PDDefaultAttributeObject()
Default constructor.
-
PDDefaultAttributeObject
public PDDefaultAttributeObject(COSDictionary dictionary)
Creates a default attribute object with a given dictionary.- Parameters:
dictionary
- the dictionary
-
-
Method Detail
-
getAttributeNames
public java.util.List<java.lang.String> getAttributeNames()
Gets the attribute names.- Returns:
- the attribute names
-
getAttributeValue
public COSBase getAttributeValue(java.lang.String attrName)
Gets the attribute value for a given name.- Parameters:
attrName
- the given attribute name- Returns:
- the attribute value for a given name
-
getAttributeValue
protected COSBase getAttributeValue(java.lang.String attrName, COSBase defaultValue)
Gets the attribute value for a given name.- Parameters:
attrName
- the given attribute namedefaultValue
- the default value- Returns:
- the attribute value for a given name
-
setAttribute
public void setAttribute(java.lang.String attrName, COSBase attrValue)
Sets an attribute.- Parameters:
attrName
- the attribute nameattrValue
- the attribute value
-
toString
public java.lang.String toString()
- Overrides:
toString
in classPDAttributeObject
-
-