public class TiffRational extends Number implements 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(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.
|
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()
public double doubleValue()
doubleValue
in class Number
public float floatValue()
floatValue
in class Number
public int intValue()
public long longValue()
public short shortValue()
shortValue
in class Number
public boolean equals(Object o)
public int hashCode()
public String toString()
public int compareTo(TiffRational q)
compareTo
in interface Comparable<TiffRational>
Copyright © 2014 Open Microscopy Environment