Package com.ibm.icu.impl.number
Class PatternStringParser.ParsedPatternInfo
- java.lang.Object
-
- com.ibm.icu.impl.number.PatternStringParser.ParsedPatternInfo
-
- All Implemented Interfaces:
AffixPatternProvider
- Enclosing class:
- PatternStringParser
public static class PatternStringParser.ParsedPatternInfo extends java.lang.Object implements AffixPatternProvider
Contains raw information about the parsed decimal format pattern string.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.ibm.icu.impl.number.AffixPatternProvider
AffixPatternProvider.Flags
-
-
Field Summary
Fields Modifier and Type Field Description PatternStringParser.ParsedSubpatternInfo
negative
java.lang.String
pattern
PatternStringParser.ParsedSubpatternInfo
positive
-
Fields inherited from interface com.ibm.icu.impl.number.AffixPatternProvider
FLAG_NEG_PREFIX, FLAG_NEG_SUFFIX, FLAG_POS_PREFIX, FLAG_POS_SUFFIX
-
-
Constructor Summary
Constructors Modifier Constructor Description private
ParsedPatternInfo(java.lang.String pattern)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description char
charAt(int flags, int index)
boolean
containsSymbolType(int type)
boolean
currencyAsDecimal()
True if the currency symbol should replace the decimal separator.private long
getEndpoints(int flags)
static int
getLengthFromEndpoints(long endpoints)
java.lang.String
getString(int flags)
boolean
hasBody()
True if the pattern has a number placeholder like "0" or "#,##0.00"; false if the pattern does not have one.boolean
hasCurrencySign()
boolean
hasNegativeSubpattern()
int
length(int flags)
boolean
negativeHasMinusSign()
boolean
positiveHasPlusSign()
-
-
-
Field Detail
-
pattern
public java.lang.String pattern
-
positive
public PatternStringParser.ParsedSubpatternInfo positive
-
negative
public PatternStringParser.ParsedSubpatternInfo negative
-
-
Method Detail
-
charAt
public char charAt(int flags, int index)
- Specified by:
charAt
in interfaceAffixPatternProvider
-
length
public int length(int flags)
- Specified by:
length
in interfaceAffixPatternProvider
-
getLengthFromEndpoints
public static int getLengthFromEndpoints(long endpoints)
-
getString
public java.lang.String getString(int flags)
- Specified by:
getString
in interfaceAffixPatternProvider
-
getEndpoints
private long getEndpoints(int flags)
-
positiveHasPlusSign
public boolean positiveHasPlusSign()
- Specified by:
positiveHasPlusSign
in interfaceAffixPatternProvider
-
hasNegativeSubpattern
public boolean hasNegativeSubpattern()
- Specified by:
hasNegativeSubpattern
in interfaceAffixPatternProvider
-
negativeHasMinusSign
public boolean negativeHasMinusSign()
- Specified by:
negativeHasMinusSign
in interfaceAffixPatternProvider
-
hasCurrencySign
public boolean hasCurrencySign()
- Specified by:
hasCurrencySign
in interfaceAffixPatternProvider
-
containsSymbolType
public boolean containsSymbolType(int type)
- Specified by:
containsSymbolType
in interfaceAffixPatternProvider
-
hasBody
public boolean hasBody()
Description copied from interface:AffixPatternProvider
True if the pattern has a number placeholder like "0" or "#,##0.00"; false if the pattern does not have one. This is used in cases like compact notation, where the pattern replaces the entire number instead of rendering the number.- Specified by:
hasBody
in interfaceAffixPatternProvider
-
currencyAsDecimal
public boolean currencyAsDecimal()
Description copied from interface:AffixPatternProvider
True if the currency symbol should replace the decimal separator.- Specified by:
currencyAsDecimal
in interfaceAffixPatternProvider
-
-