|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.poi.ss.format.SimpleFraction
public class SimpleFraction
| Constructor Summary | |
|---|---|
SimpleFraction(int numerator,
int denominator)
Create a fraction given a numerator and denominator. |
|
| Method Summary | |
|---|---|
static SimpleFraction |
buildFractionExactDenominator(double val,
int exactDenom)
Create a fraction given a double value and a denominator. |
static SimpleFraction |
buildFractionMaxDenominator(double value,
int maxDenominator)
Create a fraction given the double value and either the maximum error allowed or the maximum number of denominator digits. |
int |
getDenominator()
Access the denominator. |
int |
getNumerator()
Access the numerator. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleFraction(int numerator,
int denominator)
numerator - denominator - maxDenominator The maximum allowed value for denominator| Method Detail |
|---|
public static SimpleFraction buildFractionExactDenominator(double val,
int exactDenom)
val - double value of fractionexactDenom - the exact denominator
public static SimpleFraction buildFractionMaxDenominator(double value,
int maxDenominator)
value - the double value to convert to a fraction.maxDenominator - maximum denominator value allowed.
java.lang.RuntimeException - if the continued fraction failed to
converge.
java.lang.IllegalArgumentException - if value > Integer.MAX_VALUEpublic int getDenominator()
public int getNumerator()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||