Class UnitSpan.ParseData

  • Enclosing class:

    public static class UnitSpan.ParseData
    extends Object
    A class returned by the validatingParse() method.
    • Field Detail

      • mnValue

        public final int mnValue
        Non-fractional or entire value.
      • mnFraction

        public final int mnFraction
        Fraction part of value.
      • mnFractionScale

        public final int mnFractionScale
        Amount to divide fraction part by.
      • meUnits

        public final int meUnits
        Units parsed or defaulted.
      • mcUnit0

        public final char mcUnit0
        Unit text. Valid units are always two characters, so in order to be valid, mcUnit0 and mcUnit1 must be non-zero, and mcUnit2 must be zero.
      • mcUnit1

        public final char mcUnit1
      • mcUnit2

        public final char mcUnit2
      • mbValuePerUnit

        public final boolean mbValuePerUnit
        Should the result be interpreted as value per unit?
      • mbPercent

        public final boolean mbPercent
        Was the unit expressed as a percent?
    • Constructor Detail

      • ParseData

        public ParseData​(int nValue,
                         int nFraction,
                         int nFractionScale,
                         int eUnits,
                         char cUnit0,
                         char cUnit1,
                         char cUnit2,
                         boolean bValuePerUnit,
                         boolean bPercent)