Class CosNumeric


public class CosNumeric extends CosScalar
Represents a COS numeric value object as defined in section 3.2.2 of the PDF Reference Manual version 1.4.
  • Method Details

    • getType

      public int getType()
      return the type of this CosObject
      Specified by:
      getType in class CosObject
      Returns:
      one of the t_Mumble static final int values defined above
    • intValue

      public int intValue()
      Obtain the object's value as an integer.
      Overrides:
      intValue in class CosObject
      Returns:
      Value of the object as an integer.
    • fixedValue

      public int fixedValue() throws PDFCosParseException
      This API returns value of this number as a legacy 16.16 fixed point number. Logic of this method is copied from "Convert.cpp" file in Acrobat..
      Returns:
      int
      Throws:
      PDFCosParseException
    • longValue

      public long longValue()
      Obtain the object's value as a long.
      Overrides:
      longValue in class CosObject
      Returns:
      Value of the object as a long.
    • doubleValue

      public double doubleValue()
      Obtain the object's value as a floating point number.
      Overrides:
      doubleValue in class CosObject
      Returns:
      Value of the object in floating point.
    • numberValue

      public Number numberValue()
      Obtain the object's value as a Java Number object
      Overrides:
      numberValue in class CosObject
      Returns:
      Number object representing the object's value.
    • getValue

      public Object getValue()
      Specified by:
      getValue in class CosObject
      Returns:
      Object value of CosObject
    • equals

      public boolean equals(CosObject value)
      This method returns true if both CosNumeric have same integer or real value inside. Returns false if passed CosObject is not an instance of CosNumeric.
      Specified by:
      equals in class CosObject
      Parameters:
      value -
      Returns:
      boolean