Class PatternBean.TokenInfo

java.lang.Object
mc.core.domain.base.dobj.pattern.PatternBean.TokenInfo
All Implemented Interfaces:
Serializable
Enclosing class:
PatternBean

public class PatternBean.TokenInfo extends Object implements Serializable
token info parsed from DTPattern.pattern and DVPattern.patternValue
See Also:
  • Method Details

    • getIntegerDigits

      public Integer getIntegerDigits()
    • getFractionDigits

      public Integer getFractionDigits()
    • hasFloatingPoint

      public boolean hasFloatingPoint()
    • formatNumber

      public String formatNumber(Locale locale)
    • getToken

      public DTPattern.PatternToken getToken()
    • getValueString

      public String getValueString()
      Returns:
      the String value independently from PatternToken
    • getValueDouble

      public Double getValueDouble()
      Returns:
      Double if PatternToken is N and value can be converted to Double, otherwise null.
    • getValueUnit

      public Unit getValueUnit(List<Unit> units)
      Parameters:
      units - optional, should be the units returned by DVPattern.getUnitlist().
      Returns:
      Unit if PatternToken is U and an unit can be identified in given unit list by this value, otherwise null.
    • isStatic

      public boolean isStatic()
      Returns:
      true if value comes from type-pattern or is implicit
    • toString

      public String toString()
      Overrides:
      toString in class Object