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
This class represents a floating point number in a PDF document.
- Author:
- Ben Litchfield
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaccept
(ICOSVisitor visitor) visitor pattern double dispatch method.double
Deprecated.will be removed in a future releaseboolean
float
The value of the float object that this one wraps.int
hashCode()
int
intValue()
This will get the integer value of this object.long
This will get the long value of this object.toString()
void
writePDF
(OutputStream output) This will output this string as a PDF object.Methods inherited from class org.apache.pdfbox.cos.COSBase
getCOSObject, isDirect, setDirect
-
Constructor Details
-
COSFloat
public COSFloat(float aFloat) Constructor.- Parameters:
aFloat
- The primitive float object that this object wraps.
-
COSFloat
Constructor.- Parameters:
aFloat
- The primitive float object that this object wraps.- Throws:
IOException
- If aFloat is not a float.
-
-
Method Details
-
floatValue
public float floatValue()The value of the float object that this one wraps.- Specified by:
floatValue
in classCOSNumber
- Returns:
- The value of this object.
-
doubleValue
public double doubleValue()Deprecated.will be removed in a future releaseThe value of the double object that this one wraps.- Specified by:
doubleValue
in 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
-
hashCode
public int hashCode() -
toString
-
accept
visitor pattern double dispatch method.- Specified by:
accept
in classCOSBase
- Parameters:
visitor
- The object to notify when visiting this object.- Returns:
- any object, depending on the visitor implementation, or null
- Throws:
IOException
- If an error occurs while visiting this object.
-
writePDF
This will output this string as a PDF object.- Parameters:
output
- The stream to write to.- Throws:
IOException
- If there is an error writing to the stream.
-