Numeric (JHOVE Documentation)
Date: 2013-09-08

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.harvard.hul.ois.jhove.module.pdf
Class Numeric

    java.lang.Object
      edu.harvard.hul.ois.jhove.module.pdf.Token
          edu.harvard.hul.ois.jhove.module.pdf.Numeric

    public class Numeric

extends Token

Class for Tokens which represent PDF numbers. Numeric values are stored as `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 Summary
`Numeric()` Creates an instance of a Numeric

Method Summary
`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.

Methods inherited from class edu.harvard.hul.ois.jhove.module.pdf.Token
`isSimpleToken`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Numeric

    public Numeric()

  Creates an instance of a Numeric

Method Detail

### getIntegerValue

    public int getIntegerValue()

  Returns the value, converted to an integer

### getLongValue

    public long getLongValue()

  Returns the value, converted to a long

### getValue

    public double getValue()

  Returns the value of this Numeric as a double

### isReal

    public boolean isReal()

  Returns true if the value is stored as a floating-point number.

### setValue

    public void setValue(double value)

  Set this object's value to a double.

### setValue

    public void setValue(long value)

  Set this object's value to a long.

### isPdfACompliant

    public boolean isPdfACompliant()

  Returns true if this is within PDF/A implementation limits.

  Overrides:
    `isPdfACompliant` in class `Token`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD