public class Numeric extends Token
double
if they have a real value, or
as int if they have an integer value. The implementation notes
state that the maximum value of an integer on a 32-bit machine
is 2 ^ 31 - 1. However, they also say that byte offsets have
a limit of 10 decimal digits, which is a larger value. So we
store integer values as long.Constructor and Description |
---|
Numeric()
Creates an instance of a Numeric
|
Modifier and Type | Method and Description |
---|---|
int |
getIntegerValue()
Returns the value, converted to an integer
|
long |
getLongValue()
Returns the value, converted to a long
|
double |
getValue()
Returns the value of this Numeric as a double
|
boolean |
isPdfACompliant()
Returns true if this is within PDF/A implementation limits.
|
boolean |
isReal()
Returns true if the value is stored as a floating-point
number.
|
void |
setValue(double value)
Set this object's value to a double.
|
void |
setValue(long value)
Set this object's value to a long.
|
isSimpleToken
public int getIntegerValue()
public long getLongValue()
public double getValue()
public boolean isReal()
public void setValue(double value)
public void setValue(long value)
public boolean isPdfACompliant()
isPdfACompliant
in class Token
Copyright © 2008–2017 The Open Preservation Foundation. All rights reserved.