public class RationalNumber extends Number
Constructor and Description |
---|
RationalNumber(int numerator,
int divisor) |
Modifier and Type | Method and Description |
---|---|
double |
doubleValue() |
static RationalNumber |
factoryMethod(long n,
long d) |
float |
floatValue() |
int |
intValue() |
boolean |
isValid() |
long |
longValue() |
RationalNumber |
negate() |
String |
toDisplayString() |
String |
toString() |
byteValue, shortValue
public static final RationalNumber factoryMethod(long n, long d)
public RationalNumber negate()
public double doubleValue()
doubleValue
in class Number
public float floatValue()
floatValue
in class Number
public boolean isValid()
public String toDisplayString()
Copyright © 2007-2012. All Rights Reserved.