public class TiffRational extends java.lang.Number implements java.lang.Comparable<TiffRational>
Modifier and Type | Field and Description |
---|---|
protected long |
denom
Components of the rational's fractional representation.
|
protected long |
numer
Components of the rational's fractional representation.
|
Constructor and Description |
---|
TiffRational(long numer,
long denom)
Constructs a rational number.
|
Modifier and Type | Method and Description |
---|---|
byte |
byteValue()
Returns the value of the specified number as a byte.
|
int |
compareTo(TiffRational q)
Compares this object with the specified object for order.
|
double |
doubleValue()
Returns the value of the specified number as a double.
|
boolean |
equals(java.lang.Object o)
Indicates whether some other object is "equal to" this one.
|
float |
floatValue()
Returns the value of the specified number as a float.
|
long |
getDenominator()
Gets this number's denominator.
|
long |
getNumerator()
Gets this number's numerator.
|
int |
hashCode()
Reasonable hash value for use with hashtables.
|
int |
intValue()
Returns the value of the specified number as an int.
|
long |
longValue()
Returns the value of the specified number as a long.
|
void |
reduce()
Reduces this rational's fraction to lowest terms.
|
short |
shortValue()
Returns the value of the specified number as a short.
|
java.lang.String |
toString()
Returns a string representation of the object.
|
protected long numer
protected long denom
public TiffRational(long numer, long denom)
public long getNumerator()
public long getDenominator()
public void reduce()
public byte byteValue()
byteValue
in class java.lang.Number
public double doubleValue()
doubleValue
in class java.lang.Number
public float floatValue()
floatValue
in class java.lang.Number
public int intValue()
intValue
in class java.lang.Number
public long longValue()
longValue
in class java.lang.Number
public short shortValue()
shortValue
in class java.lang.Number
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public int compareTo(TiffRational q)
compareTo
in interface java.lang.Comparable<TiffRational>
Copyright © 2020 Open Microscopy Environment