public class COSInteger extends COSNumber
| Modifier and Type | Field and Description | 
|---|---|
| static COSInteger | ONEConstant for the number one. | 
| static COSInteger | THREEConstant for the number three. | 
| static COSInteger | TWOConstant for the number two. | 
| static COSInteger | ZEROConstant for the number zero. | 
| Constructor and Description | 
|---|
| COSInteger(int val)Deprecated. 
 use the static  get(long)method instead | 
| COSInteger(long val)Deprecated. 
 use the static  get(long)method instead | 
| COSInteger(String val)Deprecated. 
 use the static  get(long)method instead | 
| Modifier and Type | Method and Description | 
|---|---|
| Object | accept(ICOSVisitor visitor)visitor pattern double dispatch method. | 
| double | doubleValue()polymorphic access to value as float. | 
| boolean | equals(Object o) | 
| float | floatValue()polymorphic access to value as float. | 
| static COSInteger | get(long val)Returns a COSInteger instance with the given value. | 
| int | hashCode() | 
| int | intValue()Polymorphic access to value as int
 This will get the integer value of this object. | 
| long | longValue()Polymorphic access to value as int
 This will get the integer value of this object. | 
| void | setValue(long newValue)Change the value of this reference. | 
| String | toString() | 
| void | writePDF(OutputStream output)This will output this string as a PDF object. | 
getCOSObject, getFilterManager, isDirect, isNeedToBeUpdate, setDirect, setNeedToBeUpdatepublic static final COSInteger ZERO
public static final COSInteger ONE
public static final COSInteger TWO
public static final COSInteger THREE
public COSInteger(long val)
get(long) method insteadval - The integer value of this object.public COSInteger(int val)
get(long) method insteadval - The integer value of this object.public COSInteger(String val) throws IOException
get(long) method insteadval - The string value of the integer.IOException - If the val is not an integer type.public static COSInteger get(long val)
val - integer valuepublic void setValue(long newValue)
newValue - The new value.public float floatValue()
floatValue in class COSNumberpublic double doubleValue()
doubleValue in class COSNumberpublic int intValue()
public long longValue()
public Object accept(ICOSVisitor visitor) throws COSVisitorException
accept in class COSBasevisitor - The object to notify when visiting this object.COSVisitorException - If an error occurs while visiting this object.public void writePDF(OutputStream output) throws IOException
output - The stream to write to.IOException - If there is an error writing to the stream.Copyright © 2002–2016 The Apache Software Foundation. All rights reserved.