CosPdfNumber

Inheritance: java.lang.Object, com.aspose.pdf.dataeditor.CosPdfPrimitive com.aspose.pdf.dataeditor.CosPdfNumber, com.aspose.pdf.dataeditor.CosPdfPrimitive, com.aspose.pdf.dataeditor.CosPdfNumber

All Implemented Interfaces: ICosPdfPrimitive

public final class CosPdfNumber extends CosPdfPrimitive

This class represents Pdf Number type.

Constructors

ConstructorDescription
CosPdfNumberInitializes a new instance of the {@link CosPdfNumber} class.
CosPdfNumberInitializes a new instance of the {@link CosPdfNumber} class.

Methods

MethodDescription
equalsDetermines that the specified object is equal to the current object.
getValueGets the value. Value: The value.
hashCodeGet hashcode for current object.
toCosPdfNumberTries cast this instance to {@link CosPdfNumber}.
toStringReturns a {@link String} that represents the current {@link CosPdfNumber}.

CosPdfNumber

public CosPdfNumber()

Initializes a new instance of the {@link CosPdfNumber} class.

CosPdfNumber

public CosPdfNumber(double value)

Initializes a new instance of the {@link CosPdfNumber} class.

Parameters:

ParameterTypeDescription
valueThe number.

equals

Determines that the specified object is equal to the current object.

getValue

public final double getValue()

Gets the value. Value: The value.

Returns: double value

hashCode

public int hashCode()

Get hashcode for current object.

Returns: A hash code for current object.

toCosPdfNumber

public CosPdfNumber toCosPdfNumber()

Tries cast this instance to {@link CosPdfNumber}.

Returns: null if instance is not {@link CosPdfNumber} else {@link CosPdfNumber}.

toString

public String toString()

Returns a {@link String} that represents the current {@link CosPdfNumber}.

Returns: A {@link String} that represents the current {@link CosPdfNumber}.