TiffRational
Leave feedback
On this page
Inheritance: java.lang.Object
All Implemented Interfaces: com.aspose.ms.System.IEquatable
public final class TiffRational implements System.IEquatable<TiffRational>
Represents a rational number.
| Constructor | Description |
|---|---|
| TiffRational(long numerator, long denominator) | Initializes a new instance of the TiffRational class. |
| Method | Description |
|---|---|
| getNumerator() | Gets the numerator. |
| getDenominator() | Gets the denominator. |
| getValue() | Gets the rational value. |
| equals(TiffRational rational, TiffRational other) | Compares a pair of TiffRational numbers. |
| equals(TiffRational other) | Indicates whether the current object is equal to another object of the same type. |
| equals(Object obj) | Indicates whether the current object is equal to another object of the same type. |
| hashCode() | Returns a hash code for this instance. |
| op_Equality(TiffRational left, TiffRational right) | Indicates whether two objects of the same type are equal. |
| op_Inequality(TiffRational left, TiffRational right) | Indicates whether two objects of the same type are not equal. |
| toString() | Returns a string that represents this instance. |
public TiffRational(long numerator, long denominator)
Initializes a new instance of the TiffRational class.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| numerator | long | The numerator. |
| denominator | long | The denominator. |
public final long getNumerator()
Gets the numerator.
Returns: long - The numerator.
public final long getDenominator()
Gets the denominator.
Returns: long - The denominator.
public final double getValue()
Gets the rational value.
Returns: double - The rational value.
public static boolean equals(TiffRational rational, TiffRational other)
Compares a pair of TiffRational numbers.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| rational | TiffRational | A rational number. |
| other | TiffRational | Another rational number. |
Returns: boolean - true if the objects are equal; otherwise, false .
public final boolean equals(TiffRational other)
Indicates whether the current object is equal to another object of the same type.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| other | TiffRational | An object to compare with this object. |
Returns: boolean - true if the current object is equal to the other parameter; otherwise, false .
public boolean equals(Object obj)
Indicates whether the current object is equal to another object of the same type.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| obj | java.lang.Object | An object to compare with this object. |
Returns: boolean - true if the current object is equal to the obj parameter; otherwise, false .
public int hashCode()
Returns a hash code for this instance.
Returns: int - A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
public static boolean op_Equality(TiffRational left, TiffRational right)
Indicates whether two objects of the same type are equal.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| left | TiffRational | The left object. |
| right | TiffRational | The rigt object. |
Returns: boolean - True if the objects are equal; otherwise, false.
public static boolean op_Inequality(TiffRational left, TiffRational right)
Indicates whether two objects of the same type are not equal.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| left | TiffRational | The left object. |
| right | TiffRational | The right object. |
Returns: boolean - True if the objects are not equal; otherwise, false.
public String toString()
Returns a string that represents this instance.
Returns: java.lang.String - A string that represents this instance.
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.