public class Ratio
extends java.lang.Number
implements java.lang.Comparable
Modifier and Type | Field and Description |
---|---|
java.math.BigInteger |
denominator |
java.math.BigInteger |
numerator |
Constructor and Description |
---|
Ratio(java.math.BigInteger numerator,
java.math.BigInteger denominator) |
Modifier and Type | Method and Description |
---|---|
java.math.BigInteger |
bigIntegerValue() |
int |
compareTo(java.lang.Object o) |
java.math.BigDecimal |
decimalValue() |
java.math.BigDecimal |
decimalValue(java.math.MathContext mc) |
double |
doubleValue() |
boolean |
equals(java.lang.Object arg0) |
float |
floatValue() |
int |
hashCode() |
int |
intValue() |
long |
longValue() |
java.lang.String |
toString() |
public final java.math.BigInteger numerator
public final java.math.BigInteger denominator
public Ratio(java.math.BigInteger numerator, java.math.BigInteger denominator)
public boolean equals(java.lang.Object arg0)
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 intValue()
intValue
in class java.lang.Number
public long longValue()
longValue
in class java.lang.Number
public float floatValue()
floatValue
in class java.lang.Number
public double doubleValue()
doubleValue
in class java.lang.Number
public java.math.BigDecimal decimalValue()
public java.math.BigDecimal decimalValue(java.math.MathContext mc)
public java.math.BigInteger bigIntegerValue()
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable