Package org.apache.pdfbox.cos
Class COSNumber
- java.lang.Object
-
- org.apache.pdfbox.cos.COSBase
-
- org.apache.pdfbox.cos.COSNumber
-
- All Implemented Interfaces:
COSObjectable
- Direct Known Subclasses:
COSFloat,COSInteger
public abstract class COSNumber extends COSBase
This class represents an abstract number in a PDF document.
-
-
Constructor Summary
Constructors Constructor Description COSNumber()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract floatfloatValue()This will get the float value of this number.static COSNumberget(java.lang.String number)This factory method will get the appropriate number object.abstract intintValue()This will get the integer value of this number.private static booleanisFloat(java.lang.String number)abstract longlongValue()This will get the long value of this number.
-
-
-
Method Detail
-
floatValue
public abstract float floatValue()
This will get the float value of this number.- Returns:
- The float value of this object.
-
intValue
public abstract int intValue()
This will get the integer value of this number.- Returns:
- The integer value of this number.
-
longValue
public abstract long longValue()
This will get the long value of this number.- Returns:
- The long value of this number.
-
get
public static COSNumber get(java.lang.String number) throws java.io.IOException
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:
java.io.IOException- If the string is not a number.
-
isFloat
private static boolean isFloat(java.lang.String number)
-
-