Class PDUserProperty
- java.lang.Object
-
- org.apache.pdfbox.pdmodel.common.PDDictionaryWrapper
-
- org.apache.pdfbox.pdmodel.documentinterchange.logicalstructure.PDUserProperty
-
- All Implemented Interfaces:
COSObjectable
public class PDUserProperty extends PDDictionaryWrapper
A user property.
-
-
Field Summary
Fields Modifier and Type Field Description private PDUserAttributeObjectuserAttributeObject
-
Constructor Summary
Constructors Constructor Description PDUserProperty(COSDictionary dictionary, PDUserAttributeObject userAttributeObject)Creates a user property with a given dictionary.PDUserProperty(PDUserAttributeObject userAttributeObject)Creates a new user property.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.lang.StringgetFormattedValue()Returns the string for the property value.java.lang.StringgetName()Returns the property name.COSBasegetValue()Returns the property value.inthashCode()private booleanisEntryChanged(java.lang.Object oldEntry, java.lang.Object newEntry)Is the value changed?booleanisHidden()Shall the property be hidden?private voidpotentiallyNotifyChanged(java.lang.Object oldEntry, java.lang.Object newEntry)Notifies the user attribute object if the user property is changed.voidsetFormattedValue(java.lang.String formattedValue)Sets the string for the property value.voidsetHidden(boolean hidden)Specifies whether the property shall be hidden.voidsetName(java.lang.String name)Sets the property name.voidsetValue(COSBase value)Sets the property value.java.lang.StringtoString()-
Methods inherited from class org.apache.pdfbox.pdmodel.common.PDDictionaryWrapper
getCOSObject
-
-
-
-
Field Detail
-
userAttributeObject
private final PDUserAttributeObject userAttributeObject
-
-
Constructor Detail
-
PDUserProperty
public PDUserProperty(PDUserAttributeObject userAttributeObject)
Creates a new user property.- Parameters:
userAttributeObject- the user attribute object
-
PDUserProperty
public PDUserProperty(COSDictionary dictionary, PDUserAttributeObject userAttributeObject)
Creates a user property with a given dictionary.- Parameters:
dictionary- the dictionaryuserAttributeObject- the user attribute object
-
-
Method Detail
-
getName
public java.lang.String getName()
Returns the property name.- Returns:
- the property name
-
setName
public void setName(java.lang.String name)
Sets the property name.- Parameters:
name- the property name
-
getValue
public COSBase getValue()
Returns the property value.- Returns:
- the property value
-
setValue
public void setValue(COSBase value)
Sets the property value.- Parameters:
value- the property value
-
getFormattedValue
public java.lang.String getFormattedValue()
Returns the string for the property value.- Returns:
- the string for the property value
-
setFormattedValue
public void setFormattedValue(java.lang.String formattedValue)
Sets the string for the property value.- Parameters:
formattedValue- the string for the property value
-
isHidden
public boolean isHidden()
Shall the property be hidden?- Returns:
trueif the property shall be hidden,falseotherwise
-
setHidden
public void setHidden(boolean hidden)
Specifies whether the property shall be hidden.- Parameters:
hidden-trueif the property shall be hidden,falseotherwise
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
potentiallyNotifyChanged
private void potentiallyNotifyChanged(java.lang.Object oldEntry, java.lang.Object newEntry)Notifies the user attribute object if the user property is changed.- Parameters:
oldEntry- old entrynewEntry- new entry
-
isEntryChanged
private boolean isEntryChanged(java.lang.Object oldEntry, java.lang.Object newEntry)Is the value changed?- Parameters:
oldEntry- old entrynewEntry- new entry- Returns:
trueif the entry is changed,falseotherwise
-
hashCode
public int hashCode()
- Overrides:
hashCodein classPDDictionaryWrapper
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classPDDictionaryWrapper
-
-