Package mc.core.domain.base.dobj.pattern
Class PatternBean.TokenInfo
java.lang.Object
mc.core.domain.base.dobj.pattern.PatternBean.TokenInfo
- All Implemented Interfaces:
Serializable
- Enclosing class:
- PatternBean
token info parsed from DTPattern.pattern and DVPattern.patternValue
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionformatNumber(Locale locale) getToken()getValueUnit(List<Unit> units) booleanbooleanisStatic()toString()
-
Method Details
-
getIntegerDigits
-
getFractionDigits
-
hasFloatingPoint
public boolean hasFloatingPoint() -
formatNumber
-
getToken
-
getValueString
- Returns:
- the String value independently from PatternToken
-
getValueDouble
- Returns:
- Double if PatternToken is N and value can be converted to Double, otherwise null.
-
getValueUnit
- Parameters:
units- optional, should be the units returned byDVPattern.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
-