CosPdfNumber

Inheritance: java.lang.Object, com.aspose.pdf.utils.publicdata.CosPdfPrimitive

public final class CosPdfNumber extends CosPdfPrimitive

This class represents Pdf Number type.

Constructors

ConstructorDescription
CosPdfNumber()Initializes a new instance of the CosPdfNumber class.
CosPdfNumber(double value)Initializes a new instance of the CosPdfNumber class.

Methods

MethodDescription
getValue()Gets the value.
toCosPdfNumber()Tries cast this instance to CosPdfNumber.
toString()Returns a String that represents the current CosPdfNumber.
hashCode()Get hashcode for current object.
equals(Object obj)Determines that the specified object is equal to the current object.

CosPdfNumber()

public CosPdfNumber()

Initializes a new instance of the CosPdfNumber class.

CosPdfNumber(double value)

public CosPdfNumber(double value)

Initializes a new instance of the CosPdfNumber class.

Parameters:

ParameterTypeDescription
valuedoubleThe number.

getValue()

public final double getValue()

Gets the value.

Returns: double - boolean value.

toCosPdfNumber()

public CosPdfNumber toCosPdfNumber()

Tries cast this instance to CosPdfNumber.

Returns: CosPdfNumber - null if instance is not CosPdfNumber else CosPdfNumber.

toString()

public String toString()

Returns a String that represents the current CosPdfNumber.

Returns: java.lang.String - A String that represents the current CosPdfNumber.

hashCode()

public int hashCode()

Get hashcode for current object.

Returns: int - A hash code for current object.

equals(Object obj)

public boolean equals(Object obj)

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

Parameters:

ParameterTypeDescription
objjava.lang.ObjectThe object to compare with current object

Returns: boolean - true if specified object is equal to the current object; otherwise, false.