Index
All Classes and Interfaces|All Packages|Serialized Form
A
- add(Rational) - Method in class Rational
-
Returns a Rational whose value is (this + r).
C
- compareTo(Rational) - Method in class Rational
D
- denominator - Variable in class Rational
-
The denominator part of the rational number.
- divide(Rational) - Method in class Rational
-
Returns a Rational whose value is (this / r).
- doubleValue() - Method in class Rational
E
- equals(Object) - Method in class Rational
F
- floatValue() - Method in class Rational
- FORMAT - Static variable in class Rational
- formatTo(Formatter, int, int, int) - Method in class Rational
G
- gcd(long, long) - Static method in class Rational
-
Computes the greates common divisor using Euclids algorithm.
- getDenominator() - Method in class Rational
-
Returns the denominator part of the reduced rational number.
- getNumerator() - Method in class Rational
-
Returns the numerator part of the reduced rational number.
H
- hashCode() - Method in class Rational
I
- intValue() - Method in class Rational
- invert() - Method in class Rational
-
Returns a Rational with numerator and denominator swapped.
L
- longValue() - Method in class Rational
M
- main(String[]) - Static method in class RationalTest
-
Evaluates an arithmetic postfix expression with rational numbers.
- MAX_VALUE - Static variable in class Rational
-
The largest positive value of type Rational, Integer.MAX_VALUE.
- MIN_VALUE - Static variable in class Rational
-
The smallest positive nonzero value of type Rational, 1 / Integer.MAX_VALUE.
- multiply(Rational) - Method in class Rational
-
Returns a Rational whose value is (this * r).
N
- negate() - Method in class Rational
-
Returns a Rational with inverted sign.
- numerator - Variable in class Rational
-
The numerator part of the rational number.
O
R
- Rational - Class in Unnamed Package
-
A rational number, stored as numerator and denominator integer pair.
- Rational(long, long) - Constructor for class Rational
- RationalTest - Class in Unnamed Package
-
Test driver.
- RationalTest() - Constructor for class RationalTest
S
- signum() - Method in class Rational
-
Returns the signum function of this Rational.
- subtract(Rational) - Method in class Rational
-
Returns a Rational whose value is (this - r).
T
- toString() - Method in class Rational
-
Returns a string representation of this Rational.
V
- valueOf(int) - Static method in class Rational
-
Converts an integer to a rational number.
- valueOf(int, int) - Static method in class Rational
-
Rational number with numerator n and denominator d.
- valueOf(String) - Static method in class Rational
-
Converts a string to a rational number.
Z
A C D E F G H I L M N O R S T V ZAll Classes and Interfaces|All Packages|Serialized Form