Class COSInteger

All Implemented Interfaces:
COSObjectable

public final class COSInteger extends COSNumber
This class represents an integer number in a PDF document.
Author:
Ben Litchfield
  • Field Details

  • Constructor Details

    • COSInteger

      public COSInteger(long value)
      creates a COSInteger that is not cached
  • Method Details

    • get

      public static COSInteger get(long val)
      Factory method for a COSInteger instance with the given value.
      Parameters:
      val - integer value
      Returns:
      COSInteger instance
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • floatValue

      public float floatValue()
      Specified by:
      floatValue in class COSNumber
      Returns:
      The float value of this object.
    • doubleValue

      public double doubleValue()
      Specified by:
      doubleValue in class COSNumber
      Returns:
      The double value of this number.
    • intValue

      public int intValue()
      Specified by:
      intValue in class COSNumber
      Returns:
      The integer value of this number.
    • longValue

      public long longValue()
      Specified by:
      longValue in class COSNumber
      Returns:
      The long value of this number.
    • accept

      public void accept(COSVisitor visitor) throws IOException
      Description copied from class: COSBase
      Visitor pattern for the COS model objects
      Specified by:
      accept in class COSBase
      Throws:
      IOException