org.apache.pdfbox.pdmodel.documentinterchange.taggedpdf

## Class PDStandardAttributeObject

- java.lang.Object
- - org.apache.pdfbox.pdmodel.common.PDDictionaryWrapper
  - - org.apache.pdfbox.pdmodel.documentinterchange.logicalstructure.PDAttributeObject
    - - org.apache.pdfbox.pdmodel.documentinterchange.taggedpdf.PDStandardAttributeObject

All Implemented Interfaces:
  COSObjectable

Direct Known Subclasses:
  PDLayoutAttributeObject, PDListAttributeObject, PDPrintFieldAttributeObject, PDTableAttributeObject

    public abstract class PDStandardAttributeObject
    extends PDAttributeObject

A standard attribute object.

Author:
  Johannes Koch

### Field Summary

Fields
`protected static float` `UNSPECIFIED` An "unspecified" default float value.

### Constructor Summary

Constructors
Constructor and Description
`PDStandardAttributeObject()` Default constructor.
`PDStandardAttributeObject(COSDictionary dictionary)` Creates a new standard attribute object with a given dictionary.

### Method Summary

All Methods Instance Methods Concrete Methods
`protected String[]` `getArrayOfString(String name)` Gets an array of strings.
`protected PDGamma` `getColor(String name)` Gets a colour.
`protected Object` `getColorOrFourColors(String name)` Gets a single colour or four colours.
`protected int` `getInteger(String name, int defaultValue)` Gets an integer.
`protected String` `getName(String name)` Gets a name value.
`protected String` `getName(String name, String defaultValue)` Gets a name value.
`protected Object` `getNameOrArrayOfName(String name, String defaultValue)` Gets a name value or array of name values.
`protected float` `getNumber(String name)` Gets a number value.
`protected float` `getNumber(String name, float defaultValue)` Gets a number value.
`protected Object` `getNumberOrArrayOfNumber(String name, float defaultValue)` Gets a number or an array of numbers.
`protected Object` `getNumberOrName(String name, String defaultValue)` Gets a number or a name value.
`protected String` `getString(String name)` Gets a string attribute value.
`boolean` `isSpecified(String name)` Is the attribute with the given name specified in this attribute object?
`protected void` `setArrayOfName(String name, String[] values)` Sets an array of name values.
`protected void` `setArrayOfNumber(String name, float[] values)` Sets an array of float numbers.
`protected void` `setArrayOfString(String name, String[] values)` Sets an array of strings.
`protected void` `setColor(String name, PDGamma value)` Sets a colour.
`protected void` `setFourColors(String name, PDFourColours value)` Sets four colours.
`protected void` `setInteger(String name, int value)` Sets an integer.
`protected void` `setName(String name, String value)` Sets a name value.
`protected void` `setNumber(String name, float value)` Sets a float number.
`protected void` `setNumber(String name, int value)` Sets an integer number.
`protected void` `setString(String name, String value)` Sets a string attribute value.

### Methods inherited from class org.apache.pdfbox.pdmodel.documentinterchange.logicalstructure.PDAttributeObject

`arrayToString, arrayToString, create, getOwner, isEmpty, notifyChanged, potentiallyNotifyChanged, setOwner, setStructureElement, toString`

### Methods inherited from class org.apache.pdfbox.pdmodel.common.PDDictionaryWrapper

`equals, getCOSObject, hashCode`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Field Detail

#### UNSPECIFIED

    protected static final float UNSPECIFIED

An "unspecified" default float value.

See Also:
  Constant Field Values

### Constructor Detail

#### PDStandardAttributeObject

    public PDStandardAttributeObject()

Default constructor.

#### PDStandardAttributeObject

    public PDStandardAttributeObject(COSDictionary dictionary)

Creates a new standard attribute object with a given dictionary.

Parameters:
  `dictionary` - the dictionary

### Method Detail

#### isSpecified

    public boolean isSpecified(String name)

Is the attribute with the given name specified in this attribute object?

Parameters:
  `name` - the attribute name
Returns:
  `true` if the attribute is specified, `false` otherwise

#### getString

    protected String getString(String name)

Gets a string attribute value.

Parameters:
  `name` - the attribute name
Returns:
  the string attribute value

#### setString

    protected void setString(String name,
                             String value)

Sets a string attribute value.

Parameters:
  `name` - the attribute name
  `value` - the string attribute value

#### getArrayOfString

    protected String[] getArrayOfString(String name)

Gets an array of strings.

Parameters:
  `name` - the attribute name
Returns:
  the array of strings

#### setArrayOfString

    protected void setArrayOfString(String name,
                                    String[] values)

Sets an array of strings.

Parameters:
  `name` - the attribute name
  `values` - the array of strings

#### getName

    protected String getName(String name)

Gets a name value.

Parameters:
  `name` - the attribute name
Returns:
  the name value

#### getName

    protected String getName(String name,
                             String defaultValue)

Gets a name value.

Parameters:
  `name` - the attribute name
  `defaultValue` - the default value
Returns:
  the name value

#### getNameOrArrayOfName

    protected Object getNameOrArrayOfName(String name,
                                          String defaultValue)

Gets a name value or array of name values.

Parameters:
  `name` - the attribute name
  `defaultValue` - the default value
Returns:
  a String or array of Strings

#### setName

    protected void setName(String name,
                           String value)

Sets a name value.

Parameters:
  `name` - the attribute name
  `value` - the name value

#### setArrayOfName

    protected void setArrayOfName(String name,
                                  String[] values)

Sets an array of name values.

Parameters:
  `name` - the attribute name
  `values` - the array of name values

#### getNumberOrName

    protected Object getNumberOrName(String name,
                                     String defaultValue)

Gets a number or a name value.

Parameters:
  `name` - the attribute name
  `defaultValue` - the default name
Returns:
  a Float or a String

#### getInteger

    protected int getInteger(String name,
                             int defaultValue)

Gets an integer.

Parameters:
  `name` - the attribute name
  `defaultValue` - the default value
Returns:
  the integer

#### setInteger

    protected void setInteger(String name,
                              int value)

Sets an integer.

Parameters:
  `name` - the attribute name
  `value` - the integer

#### getNumber

    protected float getNumber(String name,
                              float defaultValue)

Gets a number value.

Parameters:
  `name` - the attribute name
  `defaultValue` - the default value
Returns:
  the number value

#### getNumber

    protected float getNumber(String name)

Gets a number value.

Parameters:
  `name` - the attribute name
Returns:
  the number value

#### getNumberOrArrayOfNumber

    protected Object getNumberOrArrayOfNumber(String name,
                                              float defaultValue)

Gets a number or an array of numbers.

Parameters:
  `name` - the attribute name
  `defaultValue` - the default value
Returns:
  a Float or an array of floats

#### setNumber

    protected void setNumber(String name,
                             float value)

Sets a float number.

Parameters:
  `name` - the attribute name
  `value` - the float number

#### setNumber

    protected void setNumber(String name,
                             int value)

Sets an integer number.

Parameters:
  `name` - the attribute name
  `value` - the integer number

#### setArrayOfNumber

    protected void setArrayOfNumber(String name,
                                    float[] values)

Sets an array of float numbers.

Parameters:
  `name` - the attribute name
  `values` - the float numbers

#### getColor

    protected PDGamma getColor(String name)

Gets a colour.

Parameters:
  `name` - the attribute name
Returns:
  the colour

#### getColorOrFourColors

    protected Object getColorOrFourColors(String name)

Gets a single colour or four colours.

Parameters:
  `name` - the attribute name
Returns:
  the single (`PDGamma`) or a (`PDFourColours`)

#### setColor

    protected void setColor(String name,
                            PDGamma value)

Sets a colour.

Parameters:
  `name` - the attribute name
  `value` - the colour

#### setFourColors

    protected void setFourColors(String name,
                                 PDFourColours value)

Sets four colours.

Parameters:
  `name` - the attribute name
  `value` - the four colours