Package com.independentsoft.office.odf.styles

# Class Fraction

java.lang.Object
com.independentsoft.office.odf.styles.Number
com.independentsoft.office.odf.styles.Fraction

public class Fraction extends Number
Represents the display formatting properties for a number style that should be displayed as a fraction.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Fraction()`
  Initializes a new instance of the Fraction class.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Fraction`
  `clone()`
  Creates a new object that is a deep copy of the current instance.
  `int`
  `getDenominatorValue()`
  Gets integer value that is used as denominator of a fraction.
  `int`
  `getMinDenominatorDigits()`
  Gets the minimum number of digits to use to display the denominator of a fraction.
  `int`
  `getMinIntegerDigits()`
  Gets the minimum number of integer digits to display in a number, a scientific number, or a fraction.
  `int`
  `getMinNumeratorDigits()`
  Gets the minimum number of digits to use to display the numerator in a fraction.
  `boolean`
  `isGrouping()`
  Specifies whether the integer digits of a number should be grouped using a separator character.
  `void`
  `setDenominatorValue​(int denominatorValue)`
  Sets integer value that is used as denominator of a fraction.
  `void`
  `setGrouping​(boolean grouping)`
  Specifies whether the integer digits of a number should be grouped using a separator character.
  `void`
  `setMinDenominatorDigits​(int minDenominatorDigits)`
  Sets the minimum number of digits to use to display the denominator of a fraction.
  `void`
  `setMinIntegerDigits​(int minIntegerDigits)`
  Sets the minimum number of integer digits to display in a number, a scientific number, or a fraction.
  `void`
  `setMinNumeratorDigits​(int minNumeratorDigits)`
  Sets the minimum number of digits to use to display the numerator in a fraction.
  `String`
  `toString()`
  Converts the value of the current Fraction object to its equivalent string representation.

  ### Methods inherited from class java.lang.Object

  `equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### Fraction

    public Fraction()
    Initializes a new instance of the Fraction class.

- ## Method Details

  - ### clone

    public Fraction clone()
    Creates a new object that is a deep copy of the current instance.
    Specified by:
      `clone` in class `Number`
    Returns:
      A new object that is a copy of this instance.

  - ### toString

    public String toString()
    Converts the value of the current Fraction object to its equivalent string representation.
    Overrides:
      `toString` in class `Object`
    Returns:
      the string

  - ### getMinNumeratorDigits

    public int getMinNumeratorDigits()
    Gets the minimum number of digits to use to display the numerator in a fraction.
    Returns:
      the min numerator digits

  - ### setMinNumeratorDigits

    public void setMinNumeratorDigits​(int minNumeratorDigits)
    Sets the minimum number of digits to use to display the numerator in a fraction.
    Parameters:
      `minNumeratorDigits` - the new min numerator digits

  - ### getMinDenominatorDigits

    public int getMinDenominatorDigits()
    Gets the minimum number of digits to use to display the denominator of a fraction.
    Returns:
      the min denominator digits

  - ### setMinDenominatorDigits

    public void setMinDenominatorDigits​(int minDenominatorDigits)
    Sets the minimum number of digits to use to display the denominator of a fraction.
    Parameters:
      `minDenominatorDigits` - the new min denominator digits

  - ### getDenominatorValue

    public int getDenominatorValue()
    Gets integer value that is used as denominator of a fraction. If this attribute is not present, a denominator that is appropriate for displaying the number is used.
    Returns:
      the denominator value

  - ### setDenominatorValue

    public void setDenominatorValue​(int denominatorValue)
    Sets integer value that is used as denominator of a fraction. If this attribute is not present, a denominator that is appropriate for displaying the number is used.
    Parameters:
      `denominatorValue` - the new denominator value

  - ### getMinIntegerDigits

    public int getMinIntegerDigits()
    Gets the minimum number of integer digits to display in a number, a scientific number, or a fraction.
    Returns:
      the min integer digits

  - ### setMinIntegerDigits

    public void setMinIntegerDigits​(int minIntegerDigits)
    Sets the minimum number of integer digits to display in a number, a scientific number, or a fraction.
    Parameters:
      `minIntegerDigits` - the new min integer digits

  - ### isGrouping

    public boolean isGrouping()
    Specifies whether the integer digits of a number should be grouped using a separator character.
    Returns:
      true, if is grouping

  - ### setGrouping

    public void setGrouping​(boolean grouping)
    Specifies whether the integer digits of a number should be grouped using a separator character.
    Parameters:
      `grouping` - the new grouping