**Inheritance:**
java.lang.Object, [com.aspose.imaging.xmp.types.XmpTypeBase](../../com.aspose.imaging.xmp.types/xmptypebase)
```
public class Rational extends XmpTypeBase
```

Represents XMP Rational.
## Constructors

| Constructor | Description |
| --- | --- |
| [Rational(int numerator, int denominator)](#Rational-int-int-) | Initializes a new instance of the `Rational` class. |
## Methods

| Method | Description |
| --- | --- |
| [getNumerator()](#getNumerator--) | Gets the numerator. |
| [getDenominator()](#getDenominator--) | Gets or sets the denominator. |
| [setDenominator(int value)](#setDenominator-int-) | Gets or sets the denominator. |
| [getFloatValue()](#getFloatValue--) | Gets the float value. |
| [getXmpRepresentation()](#getXmpRepresentation--) | Gets thestring contained value in XMP format. |
### Rational(int numerator, int denominator) {#Rational-int-int-}
```
public Rational(int numerator, int denominator)
```


Initializes a new instance of the `Rational` class.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| numerator | int | The numerator. |
| denominator | int | The denominator. |

### getNumerator() {#getNumerator--}
```
public int getNumerator()
```


Gets the numerator.

Value: The numerator.

**Returns:**
int
### getDenominator() {#getDenominator--}
```
public int getDenominator()
```


Gets or sets the denominator.

**Returns:**
int - The denominator.
### setDenominator(int value) {#setDenominator-int-}
```
public void setDenominator(int value)
```


Gets or sets the denominator.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | int | The denominator. |

### getFloatValue() {#getFloatValue--}
```
public float getFloatValue()
```


Gets the float value.

**Returns:**
float - The float value.
### getXmpRepresentation() {#getXmpRepresentation--}
```
public String getXmpRepresentation()
```


Gets thestring contained value in XMP format.

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