Class FractionFormat

  • All Implemented Interfaces:
    Serializable, Cloneable

    public class FractionFormat
    extends Format

    Format class that handles Excel style fractions, such as "# #/#" and "#/###"

    As of this writing, this is still not 100% accurate, but it does a reasonable job of trying to mimic Excel's fraction calculations. It does not currently maintain Excel's spacing.

    This class relies on a method lifted nearly verbatim from org.apache.math.fraction. If further uses for Commons Math are found, we will consider adding it as a dependency. For now, we have in-lined the one method to keep things simple.

    See Also:
    Serialized Form