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 interchangable. 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()
boolean getBoolean()
Map<StringPdfValue> getDictionary()
double getDouble()
long getLong()
String getString()
PdfValue.PdfValueType getType()
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 ()

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

public boolean getBoolean ()

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

public Map<StringPdfValue> getDictionary ()

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

public double getDouble ()

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

public long getLong ()

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

public String getString ()

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

public PdfValue.PdfValueType getType ()

Returns

public String toString ()