Package org.apache.pdfbox.cos
Class COSFloat
- java.lang.Object
-
- org.apache.pdfbox.cos.COSBase
-
- org.apache.pdfbox.cos.COSNumber
-
- org.apache.pdfbox.cos.COSFloat
-
- All Implemented Interfaces:
COSObjectable
public class COSFloat extends COSNumber
This class represents a floating point number in a PDF document.- Author:
- Ben Litchfield
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectaccept(ICOSVisitor visitor)visitor pattern double dispatch method.doubledoubleValue()The value of the double object that this one wraps.booleanequals(java.lang.Object o)floatfloatValue()The value of the float object that this one wraps.inthashCode()intintValue()This will get the integer value of this object.longlongValue()This will get the long value of this object.java.lang.StringtoString()voidwritePDF(java.io.OutputStream output)This will output this string as a PDF object.-
Methods inherited from class org.apache.pdfbox.cos.COSBase
getCOSObject, isDirect, setDirect
-
-
-
-
Constructor Detail
-
COSFloat
public COSFloat(float aFloat)
Constructor.- Parameters:
aFloat- The primitive float object that this object wraps.
-
COSFloat
public COSFloat(java.lang.String aFloat) throws java.io.IOExceptionConstructor.- Parameters:
aFloat- The primitive float object that this object wraps.- Throws:
java.io.IOException- If aFloat is not a float.
-
-
Method Detail
-
floatValue
public float floatValue()
The value of the float object that this one wraps.- Specified by:
floatValuein classCOSNumber- Returns:
- The value of this object.
-
doubleValue
public double doubleValue()
The value of the double object that this one wraps.- Specified by:
doubleValuein classCOSNumber- Returns:
- The double of this object.
-
longValue
public long longValue()
This will get the long value of this object.
-
intValue
public int intValue()
This will get the integer value of this object.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
accept
public java.lang.Object accept(ICOSVisitor visitor) throws java.io.IOException
visitor pattern double dispatch method.
-
writePDF
public void writePDF(java.io.OutputStream output) throws java.io.IOExceptionThis will output this string as a PDF object.- Parameters:
output- The stream to write to.- Throws:
java.io.IOException- If there is an error writing to the stream.
-
-