public final class

PdfValue

extends Object
java.lang.Object
   ↳ com.pspdfkit.document.PdfValue

Class Overview

This represents a value stored inside a PDF document stream. The PDF has a few different data types of values that are reasonably interchangeable. The type can be retrieved with getType() and can be one of PdfValue.PdfValueType.

When creating a new value, the type will be automatically set depending on the constructor parameter.

Summary

Nested Classes
enum PdfValue.PdfValueType Type of a value stored in the PDF document stream. 
Public Constructors
PdfValue(long longValue)
Creates a new PDF value of INTEGER type.
PdfValue(double doubleValue)
Creates a new PDF value of DOUBLE type.
PdfValue(boolean booleanValue)
Creates a new PDF value of BOOLEAN type.
PdfValue(String stringValue)
Creates a new PDF value of STRING type.
PdfValue(List<PdfValue> listValue)
Creates a new PDF value of ARRAY type.
PdfValue(Map<StringPdfValue> mapValue)
Creates a new PDF value of DICTIONARY type.
PdfValue()
Creates a new PDF value of NULLOBJ type.
Public Methods
List<PdfValue> getArray()
Gets the stored List of PdfValues or null if the value isn't an array.
boolean getBoolean()
Gets the stored Boolean value or false if the value isn't a boolean.
Map<StringPdfValue> getDictionary()
Gets the stored Map of String and PdfValues, or null if the value isn't a dictionary.
double getDouble()
Gets the stored Double value or 0.0 if the value isn't a double.
long getLong()
Gets the stored Long value or 0 if the value isn't an integer.
String getString()
Gets the stored String value or null if the value isn't a string.
PdfValue.PdfValueType getType()
Gets the type of this PdfValue, which is one of PdfValue.PdfValueType.
String toString()
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public PdfValue (long longValue)

Creates a new PDF value of INTEGER type.

public PdfValue (double doubleValue)

Creates a new PDF value of DOUBLE type.

public PdfValue (boolean booleanValue)

Creates a new PDF value of BOOLEAN type.

public PdfValue (String stringValue)

Creates a new PDF value of STRING type.

public PdfValue (List<PdfValue> listValue)

Creates a new PDF value of ARRAY type.

public PdfValue (Map<StringPdfValue> mapValue)

Creates a new PDF value of DICTIONARY type.

public PdfValue ()

Creates a new PDF value of NULLOBJ type.

Public Methods

public List<PdfValue> getArray ()

Gets the stored List of PdfValues or null if the value isn't an array.

Returns
  • Stored list or null if the value isn't an array.

public boolean getBoolean ()

Gets the stored Boolean value or false if the value isn't a boolean.

Returns
  • Stored boolean value or false if the value isn't a boolean.

public Map<StringPdfValue> getDictionary ()

Gets the stored Map of String and PdfValues, or null if the value isn't a dictionary.

Returns
  • Stored map or null if the value isn't a dictionary.

public double getDouble ()

Gets the stored Double value or 0.0 if the value isn't a double.

Returns
  • Stored double value or 0.0 if the value isn't a double.

public long getLong ()

Gets the stored Long value or 0 if the value isn't an integer.

Returns
  • Stored integer value or 0 if the value isn't an integer.

public String getString ()

Gets the stored String value or null if the value isn't a string.

Returns
  • Stored string value or null if the value isn't a string.

public PdfValue.PdfValueType getType ()

Gets the type of this PdfValue, which is one of PdfValue.PdfValueType.

Returns

public String toString ()