Rational

Inheritance: java.lang.Object, com.aspose.imaging.xmp.types.XmpTypeBase

public class Rational extends XmpTypeBase

Represents XMP Rational.

Constructors

ConstructorDescription
Rational(int numerator, int denominator)Initializes a new instance of the Rational class.

Methods

MethodDescription
getNumerator()Gets the numerator.
getDenominator()Gets or sets the denominator.
setDenominator(int value)Gets or sets the denominator.
getFloatValue()Gets the float value.
getXmpRepresentation()Gets thestring contained value in XMP format.

Rational(int numerator, int denominator)

public Rational(int numerator, int denominator)

Initializes a new instance of the Rational class.

Parameters:

ParameterTypeDescription
numeratorintThe numerator.
denominatorintThe denominator.

getNumerator()

public int getNumerator()

Gets the numerator.

Value: The numerator.

Returns: int

getDenominator()

public int getDenominator()

Gets or sets the denominator.

Returns: int - The denominator.

setDenominator(int value)

public void setDenominator(int value)

Gets or sets the denominator.

Parameters:

ParameterTypeDescription
valueintThe denominator.

getFloatValue()

public float getFloatValue()

Gets the float value.

Returns: float - The float value.

getXmpRepresentation()

public String getXmpRepresentation()

Gets thestring contained value in XMP format.

Returns: java.lang.String - Returns the string contained value in XMP format.