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
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
Modifier and TypeMethodDescriptiondouble
Obtain the object's value as a floating point number.boolean
This method returns true if both CosNumeric have same integer or real value inside.int
This API returns value of this number as a legacy 16.16 fixed point number.int
getType()
return the type of this CosObjectgetValue()
int
intValue()
Obtain the object's value as an integer.long
Obtain the object's value as a long.Obtain the object's value as a Java Number objectMethods 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 Details
-
getType
public int getType()return the type of this CosObject -
intValue
public int intValue()Obtain the object's value as an integer. -
fixedValue
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
Obtain the object's value as a Java Number object- Overrides:
numberValue
in classCosObject
- Returns:
- Number object representing the object's value.
-
getValue
-
equals
This method returns true if both CosNumeric have same integer or real value inside. Returns false if passed CosObject is not an instance of CosNumeric.
-