Class CosNumeric
- java.lang.Object
-
- com.adobe.internal.pdftoolkit.core.cos.CosObject
-
- com.adobe.internal.pdftoolkit.core.cos.CosScalar
-
- com.adobe.internal.pdftoolkit.core.cos.CosNumeric
-
public class CosNumeric extends CosScalar
Represents a COS numeric value object as defined in section 3.2.2 of the PDF Reference Manual version 1.4.
-
-
Field Summary
-
Fields inherited from class com.adobe.internal.pdftoolkit.core.cos.CosObject
DIRECT, INDIRECT, t_Array, t_Boolean, t_Dictionary, t_KeyAbsent, t_Name, t_Null, t_Numeric, t_ObjectRef, t_Stream, t_String
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
doubleValue()
Obtain the object's value as a floating point number.boolean
equals(CosObject value)
This method returns true if both CosNumeric have same integer or real value inside.int
fixedValue()
This API returns value of this number as a legacy 16.16 fixed point number.int
getType()
return the type of this CosObjectObject
getValue()
int
intValue()
Obtain the object's value as an integer.long
longValue()
Obtain the object's value as a long.Number
numberValue()
Obtain the object's value as a Java Number object-
Methods inherited from class com.adobe.internal.pdftoolkit.core.cos.CosObject
booleanValue, equals, getDocument, getObjEOF, getObjGen, getObjNum, getObjPos, getObjRevision, getStreamManager, hexStringValue, isCompressed, isDirty, isIndirect, nameValue, stringValue, textValue, toString
-
-
-
-
Method Detail
-
getType
public int getType()
return the type of this CosObject
-
intValue
public int intValue()
Obtain the object's value as an integer.
-
fixedValue
public int fixedValue() throws PDFCosParseException
This API returns value of this number as a legacy 16.16 fixed point number. Logic of this method is copied from "Convert.cpp" file in Acrobat..- Returns:
- int
- Throws:
PDFCosParseException
-
longValue
public long longValue()
Obtain the object's value as a long.
-
doubleValue
public double doubleValue()
Obtain the object's value as a floating point number.- Overrides:
doubleValue
in classCosObject
- Returns:
- Value of the object in floating point.
-
numberValue
public Number numberValue()
Obtain the object's value as a Java Number object- Overrides:
numberValue
in classCosObject
- Returns:
- Number object representing the object's value.
-
getValue
public Object getValue()
-
-