Class PDDefaultAttributeObject
- java.lang.Object
-
- com.tom_roush.pdfbox.pdmodel.common.PDDictionaryWrapper
-
- com.tom_roush.pdfbox.pdmodel.documentinterchange.logicalstructure.PDAttributeObject
-
- com.tom_roush.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 List<String>getAttributeNames()Gets the attribute names.COSBasegetAttributeValue(String attrName)Gets the attribute value for a given name.protected COSBasegetAttributeValue(String attrName, COSBase defaultValue)Gets the attribute value for a given name.voidsetAttribute(String attrName, COSBase attrValue)Sets an attribute.StringtoString()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from class com.tom_roush.pdfbox.pdmodel.documentinterchange.logicalstructure.PDAttributeObject
arrayToString, arrayToString, create, getOwner, isEmpty, notifyChanged, potentiallyNotifyChanged, setOwner, setStructureElement
-
Methods inherited from class com.tom_roush.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 List<String> getAttributeNames()
Gets the attribute names.- Returns:
- the attribute names
-
getAttributeValue
public COSBase getAttributeValue(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(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(String attrName, COSBase attrValue)
Sets an attribute.- Parameters:
attrName- the attribute nameattrValue- the attribute value
-
toString
public String toString()
- Overrides:
toStringin classPDAttributeObject
-
-