Uses of Class
com.landawn.abacus.util.Fraction

Packages that use Fraction
Package
Description
 
  • Uses of Fraction in com.landawn.abacus.util

    Fields in com.landawn.abacus.util declared as Fraction
    Modifier and Type
    Field
    Description
    static final Fraction
    Fraction.FOUR_FIFTHS
    Fraction representation of 4/5.
    static final Fraction
    Fraction.ONE
    Fraction representation of 1.
    static final Fraction
    Fraction.ONE_FIFTH
    Fraction representation of 1/5.
    static final Fraction
    Fraction.ONE_HALF
    Fraction representation of 1/2.
    static final Fraction
    Fraction.ONE_QUARTER
    Fraction representation of 1/4.
    static final Fraction
    Fraction.ONE_THIRD
    Fraction representation of 1/3.
    static final Fraction
    Fraction.THREE_FIFTHS
    Fraction representation of 3/5.
    static final Fraction
    Fraction representation of 3/4.
    static final Fraction
    Fraction.TWO_FIFTHS
    Fraction representation of 2/5.
    static final Fraction
    Fraction.TWO_QUARTERS
    Fraction representation of 2/4.
    static final Fraction
    Fraction.TWO_THIRDS
    Fraction representation of 2/3.
    static final Fraction
    Fraction.ZERO
    Fraction representation of 0.
    Methods in com.landawn.abacus.util that return Fraction
    Modifier and Type
    Method
    Description
    Fraction.abs()
    Gets a fraction that is the positive equivalent of this one.
    Fraction.add(Fraction fraction)
    Adds the value of this fraction to another, returning the result in reduced form.
    Fraction.dividedBy(Fraction fraction)
    Divide the value of this fraction by another.
    Fraction.invert()
    Gets a fraction that is the inverse (1/fraction) of this one.
    Fraction.multipliedBy(Fraction fraction)
    Multiplies the value of this fraction by another, returning the result in reduced form.
    Fraction.negate()
    Gets a fraction that is the negative (-fraction) of this one.
    static Fraction
    Fraction.of(double value)
    Creates a Fraction instance from a double value.
    static Fraction
    Fraction.of(int numerator, int denominator)
     
    static Fraction
    Fraction.of(int numerator, int denominator, boolean reduce)
    Creates a Fraction instance with the 2 parts of a fraction Y/Z.
    static Fraction
    Fraction.of(int whole, int numerator, int denominator)
     
    static Fraction
    Fraction.of(int whole, int numerator, int denominator, boolean reduce)
    Creates a Fraction instance with the 3 parts of a fraction X Y/Z.
    static Fraction
    Fraction.of(String str)
    Creates a Fraction from a String.
    Fraction.pow(int power)
    Gets a fraction that is raised to the passed in power.
    Fraction.reduce()
    Reduce the fraction to the smallest values for the numerator and denominator, returning the result.
    Fraction.subtract(Fraction fraction)
    Subtracts the value of another fraction from the value of this one, returning the result in reduced form.
    Methods in com.landawn.abacus.util with parameters of type Fraction
    Modifier and Type
    Method
    Description
    Fraction.add(Fraction fraction)
    Adds the value of this fraction to another, returning the result in reduced form.
    int
    Fraction.compareTo(Fraction other)
    Compares this object to another based on size.
    Fraction.dividedBy(Fraction fraction)
    Divide the value of this fraction by another.
    Fraction.multipliedBy(Fraction fraction)
    Multiplies the value of this fraction by another, returning the result in reduced form.
    Fraction.subtract(Fraction fraction)
    Subtracts the value of another fraction from the value of this one, returning the result in reduced form.