de.intarsys.pdf.cos
Class COSFixed
java.lang.Object
de.intarsys.pdf.cos.COSDocumentElement
de.intarsys.pdf.cos.COSObject
de.intarsys.pdf.cos.COSPrimitiveObject
de.intarsys.pdf.cos.COSNumber
de.intarsys.pdf.cos.COSFixed
- All Implemented Interfaces:
- ICOSExceptionHandler, de.intarsys.tools.component.ISaveStateSupport
public class COSFixed
- extends COSNumber
Represents floating point numbers in pdf.
Methods inherited from class de.intarsys.pdf.cos.COSObject |
asArray, asBoolean, asDictionary, asInteger, asName, asNull, asStream, asString, beConstant, beIndirect, containable, copyOptional, copyShallow, copySubGraph, dereference, getContainer, getDoc, getIndirectObject, isIndirect, isNull, isSwapped, stringValue, toString |
DEFAULT_PRECISION
public static final int DEFAULT_PRECISION
- See Also:
- Constant Field Values
create
public static COSFixed create(byte[] bytes,
int start,
int length)
create
public static COSFixed create(double value)
create
public static COSFixed create(double value,
int precision)
create
public static COSFixed create(float value)
create
public static COSFixed create(float value,
int precision)
accept
public Object accept(ICOSObjectVisitor visitor)
throws COSVisitorException
- Description copied from class:
COSDocumentElement
- Accept a visitor object. The receiver selects the correct implementation
in the
visitor
by "double dispatching".
- Specified by:
accept
in class COSDocumentElement
- Parameters:
visitor
- The object visiting the receiver.
- Returns:
- Object An object depending on the visitor semantics.
- Throws:
COSVisitorException
- An exception depending on the visitor semantics.
asFixed
public COSFixed asFixed()
- Overrides:
asFixed
in class COSObject
- Returns:
- a COSFixed or
null
equals
public boolean equals(Object o)
- Overrides:
equals
in class Object
floatValue
public float floatValue()
- Description copied from class:
COSNumber
- Answer the value of the receiver as a float
- Specified by:
floatValue
in class COSNumber
- Returns:
- Answer the value of the receiver as a float
getPrecision
public int getPrecision()
- The precision (digits after period) for this.
- Returns:
- The precision (digits after period) for this.
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
intValue
public int intValue()
- Description copied from class:
COSNumber
- Answer the value of the receiver as a int
- Specified by:
intValue
in class COSNumber
- Returns:
- Answer the value of the receiver as a int
restoreState
public void restoreState(Object object)
- Specified by:
restoreState
in interface de.intarsys.tools.component.ISaveStateSupport
- Overrides:
restoreState
in class COSObject
saveState
public Object saveState()
setPrecision
public void setPrecision(int precision)
- Assign the precision for this.
- Parameters:
precision
- The new precision.
Copyright © 2006 intarsys consulting GmbH. All Rights Reserved.