Class COSFloat

All Implemented Interfaces:
COSObjectable

public class COSFloat extends COSNumber
This class represents a floating point number in a PDF document.
Author:
Ben Litchfield
  • Constructor Details

    • COSFloat

      public COSFloat(float aFloat)
      Parameters:
      aFloat - The primitive float object that this object wraps.
    • COSFloat

      public COSFloat(String aFloat) throws IOException
      Parameters:
      aFloat - The primitive float object that this object wraps.
      Throws:
      IOException - If aFloat is not a float.
  • Method Details

    • 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.
    • longValue

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

      public int intValue()
      Specified by:
      intValue in class COSNumber
      Returns:
      The integer value of this number.
    • 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
    • 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