Class UnitSpan.ParseData

  • Enclosing class:
    UnitSpan

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

      Fields 
      Modifier and Type Field Description
      boolean mbPercent
      Was the unit expressed as a percent?
      boolean mbValuePerUnit
      Should the result be interpreted as value per unit?
      char mcUnit0
      Unit text.
      char mcUnit1  
      char mcUnit2  
      int meUnits
      Units parsed or defaulted.
      int mnFraction
      Fraction part of value.
      int mnFractionScale
      Amount to divide fraction part by.
      int mnValue
      Non-fractional or entire value.
    • Constructor Summary

      Constructors 
      Constructor Description
      ParseData​(int nValue, int nFraction, int nFractionScale, int eUnits, char cUnit0, char cUnit1, char cUnit2, boolean bValuePerUnit, boolean bPercent)  
    • Method Summary

      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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)