java.lang.Object
org.sejda.sambox.cos.COSBase
org.sejda.sambox.cos.COSNumber
- All Implemented Interfaces:
COSObjectable
- Direct Known Subclasses:
COSFloat,COSInteger
This class represents an abstract number in a PDF document.
- Author:
- Ben Litchfield
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.sejda.sambox.cos.COSBase
accept, getCOSObject, hasId, id
-
Constructor Details
-
COSNumber
public COSNumber()
-
-
Method Details
-
floatValue
public abstract float floatValue()- Returns:
- The float value of this object.
-
doubleValue
public abstract double doubleValue()- Returns:
- The double value of this number.
-
intValue
public abstract int intValue()- Returns:
- The integer value of this number.
-
longValue
public abstract long longValue()- Returns:
- The long value of this number.
-
get
This factory method will get the appropriate number object.- Parameters:
number- The string representation of the number.- Returns:
- A number object, either float or int.
- Throws:
IOException- If the string is not a number.
-
idIfAbsent
Description copied from class:COSBaseAssign an id to thisCOSBaseif it doesn't have one already.- Overrides:
idIfAbsentin classCOSBase
-