public final class COSInteger extends COSNumber
Modifier and Type | Field and Description |
---|---|
private static int |
HIGH
The highest integer to be kept in the
STATIC array. |
private static int |
LOW
The lowest integer to be kept in the
STATIC array. |
static COSInteger |
ONE
Constant for the number one.
|
private static COSInteger[] |
STATIC
|
static COSInteger |
THREE
Constant for the number three.
|
static COSInteger |
TWO
Constant for the number two.
|
private long |
value |
static COSInteger |
ZERO
Constant for the number zero.
|
Modifier | Constructor and Description |
---|---|
private |
COSInteger(long val)
constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
accept(ICOSVisitor visitor)
visitor pattern double dispatch method.
|
double |
doubleValue()
polymorphic access to value as float.
|
boolean |
equals(java.lang.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.
|
java.lang.String |
toString() |
void |
writePDF(java.io.OutputStream output)
This will output this string as a PDF object.
|
getCOSObject, isDirect, setDirect
private static final int LOW
STATIC
array.private static final int HIGH
STATIC
array.private static final COSInteger[] STATIC
public static final COSInteger ZERO
public static final COSInteger ONE
public static final COSInteger TWO
public static final COSInteger THREE
private final long value
private COSInteger(long val)
val
- The integer value of this object.public static COSInteger get(long val)
val
- integer valuepublic boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public float floatValue()
floatValue
in class COSNumber
public double doubleValue()
doubleValue
in class COSNumber
public int intValue()
public long longValue()
public java.lang.Object accept(ICOSVisitor visitor) throws java.io.IOException
public void writePDF(java.io.OutputStream output) throws java.io.IOException
output
- The stream to write to.java.io.IOException
- If there is an error writing to the stream.