public class Ratio extends Number implements Comparable
Modifier and Type | Field and Description |
---|---|
BigInteger |
denominator |
BigInteger |
numerator |
Constructor and Description |
---|
Ratio(BigInteger numerator,
BigInteger denominator) |
Modifier and Type | Method and Description |
---|---|
BigInteger |
bigIntegerValue() |
int |
compareTo(Object o) |
BigDecimal |
decimalValue() |
BigDecimal |
decimalValue(MathContext mc) |
double |
doubleValue() |
boolean |
equals(Object arg0) |
float |
floatValue() |
int |
hashCode() |
int |
intValue() |
long |
longValue() |
String |
toString() |
byteValue, shortValue
public final BigInteger numerator
public final BigInteger denominator
public Ratio(BigInteger numerator, BigInteger denominator)
public float floatValue()
floatValue
in class Number
public double doubleValue()
doubleValue
in class Number
public BigDecimal decimalValue()
public BigDecimal decimalValue(MathContext mc)
public BigInteger bigIntegerValue()
public int compareTo(Object o)
compareTo
in interface Comparable
Copyright © 2017. All rights reserved.