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, shortValuepublic final BigInteger numerator
public final BigInteger denominator
public Ratio(BigInteger numerator, BigInteger denominator)
public float floatValue()
floatValue in class Numberpublic double doubleValue()
doubleValue in class Numberpublic BigDecimal decimalValue()
public BigDecimal decimalValue(MathContext mc)
public BigInteger bigIntegerValue()
public int compareTo(Object o)
compareTo in interface ComparableCopyright © 2025. All rights reserved.