Uses of Class
org.apache.commons.numbers.fraction.BigFraction
| Package | Description |
|---|---|
| org.apache.commons.numbers.fraction |
Fraction number type and fraction number formatting.
|
-
Uses of BigFraction in org.apache.commons.numbers.fraction
Fields in org.apache.commons.numbers.fraction declared as BigFraction Modifier and Type Field Description static BigFractionBigFraction. FOUR_FIFTHSA fraction representing "4/5".static BigFractionBigFraction. MINUS_ONEA fraction representing "-1 / 1".static BigFractionBigFraction. ONEA fraction representing "1".static BigFractionBigFraction. ONE_FIFTHA fraction representing "1/5".static BigFractionBigFraction. ONE_HALFA fraction representing "1/2".static BigFractionBigFraction. ONE_QUARTERA fraction representing "1/4".static BigFractionBigFraction. ONE_THIRDA fraction representing "1/3".static BigFractionBigFraction. THREE_FIFTHSA fraction representing "3/5".static BigFractionBigFraction. THREE_QUARTERSA fraction representing "3/4".static BigFractionBigFraction. TWOA fraction representing "2 / 1".static BigFractionBigFraction. TWO_FIFTHSA fraction representing "2/5".static BigFractionBigFraction. TWO_QUARTERSA fraction representing "2/4".static BigFractionBigFraction. TWO_THIRDSA fraction representing "2/3".static BigFractionBigFraction. ZEROA fraction representing "0".Methods in org.apache.commons.numbers.fraction that return BigFraction Modifier and Type Method Description BigFractionBigFraction. abs()Returns the absolute value of thisBigFraction.BigFractionBigFraction. add(int i)Adds the value of this fraction to the passedinteger, returning the result in reduced form.BigFractionBigFraction. add(long l)Adds the value of this fraction to the passedlong, returning the result in reduced form.BigFractionBigFraction. add(java.math.BigInteger bg)Adds the value of this fraction to the passedBigInteger, returning the result in reduced form.BigFractionBigFraction. add(BigFraction fraction)Adds the value of this fraction to another, returning the result in reduced form.BigFractionBigFraction. divide(int i)Divide the value of this fraction by the passedint, iethis * 1 / i, returning the result in reduced form.BigFractionBigFraction. divide(long l)Divide the value of this fraction by the passedlong, iethis * 1 / l, returning the result in reduced form.BigFractionBigFraction. divide(java.math.BigInteger bg)Divide the value of this fraction by the passedBigInteger, iethis * 1 / bg, returning the result in reduced form.BigFractionBigFraction. divide(BigFraction fraction)Divide the value of this fraction by another, returning the result in reduced form.static BigFractionBigFraction. getReducedFraction(int numerator, int denominator)Creates aBigFractioninstance with the 2 parts of a fraction Y/Z.BigFractionBigFraction. multiply(int i)Multiply the value of this fraction by the passedint, returning the result in reduced form.BigFractionBigFraction. multiply(long l)Multiply the value of this fraction by the passedlong, returning the result in reduced form.BigFractionBigFraction. multiply(java.math.BigInteger bg)Multiplies the value of this fraction by the passedBigInteger, returning the result in reduced form.BigFractionBigFraction. multiply(BigFraction fraction)Multiplies the value of this fraction by another, returning the result in reduced form.BigFractionBigFraction. negate()Return the additive inverse of this fraction, returning the result in reduced form.BigFractionBigFractionFormat. parse(java.lang.String source)Parses a string to produce aBigFractionobject.BigFractionBigFractionFormat. parse(java.lang.String source, java.text.ParsePosition pos)Parses a string to produce aBigFractionobject.BigFractionProperBigFractionFormat. parse(java.lang.String source, java.text.ParsePosition pos)Parses a string to produce aBigFractionobject.BigFractionBigFraction. pow(int exponent)Returns aBigFractionwhose value is(this<sup>exponent</sup>), returning the result in reduced form.BigFractionBigFraction. pow(long exponent)Returns aBigFractionwhose value is (thisexponent), returning the result in reduced form.BigFractionBigFraction. pow(java.math.BigInteger exponent)Returns aBigFractionwhose value is (thisexponent), returning the result in reduced form.BigFractionBigFraction. reciprocal()Return the multiplicative inverse of this fraction.BigFractionBigFraction. reduce()Reduce thisBigFractionto its lowest terms.BigFractionBigFraction. subtract(int i)Subtracts the value of anintegerfrom the value of thisBigFraction, returning the result in reduced form.BigFractionBigFraction. subtract(long l)Subtracts the value of alongfrom the value of thisBigFraction, returning the result in reduced form.BigFractionBigFraction. subtract(java.math.BigInteger bg)Subtracts the value of anBigIntegerfrom the value of thisBigFraction, returning the result in reduced form.BigFractionBigFraction. subtract(BigFraction fraction)Subtracts the value of another fraction from the value of this one, returning the result in reduced form.Methods in org.apache.commons.numbers.fraction with parameters of type BigFraction Modifier and Type Method Description BigFractionBigFraction. add(BigFraction fraction)Adds the value of this fraction to another, returning the result in reduced form.intBigFraction. compareTo(BigFraction object)Compares this object to another based on size.BigFractionBigFraction. divide(BigFraction fraction)Divide the value of this fraction by another, returning the result in reduced form.java.lang.StringBufferBigFractionFormat. format(BigFraction BigFraction, java.lang.StringBuffer toAppendTo, java.text.FieldPosition pos)Formats aBigFractionobject to produce a string.java.lang.StringBufferProperBigFractionFormat. format(BigFraction fraction, java.lang.StringBuffer toAppendTo, java.text.FieldPosition pos)Formats aBigFractionobject to produce a string.static java.lang.StringBigFractionFormat. formatBigFraction(BigFraction f)This static method calls formatBigFraction() on a default instance of BigFractionFormat.BigFractionBigFraction. multiply(BigFraction fraction)Multiplies the value of this fraction by another, returning the result in reduced form.BigFractionBigFraction. subtract(BigFraction fraction)Subtracts the value of another fraction from the value of this one, returning the result in reduced form.