class Part
Defined at line 713 of file ../../third_party/icu/latest/source/common/unicode/messagepattern.h
A message pattern "part", representing a pattern parsing event.
There is a part for the start and end of a message or argument,
for quoting and escaping of and with ASCII apostrophes,
and for syntax elements of "complex" arguments.
ICU 4.8
Public Methods
void Part ()
Default constructor, do not use.
Defined at line 719 of file ../../third_party/icu/latest/source/common/unicode/messagepattern.h
UMessagePatternPartType getType ()
Returns the type of this part.
Returns
the part type.
ICU 4.8
Defined at line 726 of file ../../third_party/icu/latest/source/common/unicode/messagepattern.h
int32_t getIndex ()
Returns the pattern string index associated with this Part.
Returns
this part's pattern string index.
ICU 4.8
Defined at line 735 of file ../../third_party/icu/latest/source/common/unicode/messagepattern.h
int32_t getLength ()
Returns the length of the pattern substring associated with this Part.
This is 0 for some parts.
Returns
this part's pattern substring length.
ICU 4.8
Defined at line 745 of file ../../third_party/icu/latest/source/common/unicode/messagepattern.h
int32_t getLimit ()
Returns the pattern string limit (exclusive-end) index associated with this Part.
Convenience method for getIndex()+getLength().
Returns
this part's pattern string limit index, same as getIndex()+getLength().
ICU 4.8
Defined at line 755 of file ../../third_party/icu/latest/source/common/unicode/messagepattern.h
int32_t getValue ()
Returns a value associated with this part.
See the documentation of each part type for details.
Returns
the part value.
ICU 4.8
Defined at line 765 of file ../../third_party/icu/latest/source/common/unicode/messagepattern.h
UMessagePatternArgType getArgType ()
Returns the argument type if this part is of type ARG_START or ARG_LIMIT,
otherwise UMSGPAT_ARG_TYPE_NONE.
Returns
the argument type for this part.
ICU 4.8
Defined at line 775 of file ../../third_party/icu/latest/source/common/unicode/messagepattern.h
UBool hasNumericValue (UMessagePatternPartType type)
Indicates whether the Part type has a numeric value.
If so, then that numeric value can be retrieved via MessagePattern.getNumericValue().
Parameters
Returns
true if the Part type has a numeric value.
ICU 4.8
Defined at line 791 of file ../../third_party/icu/latest/source/common/unicode/messagepattern.h
bool operator!= (const Part & other)
Parameters
Returns
false if this object is equivalent to the other one.
ICU 4.8
Defined at line 807 of file ../../third_party/icu/latest/source/common/unicode/messagepattern.h
int32_t hashCode ()
Returns
A hash code for this object.
ICU 4.8
Defined at line 815 of file ../../third_party/icu/latest/source/common/unicode/messagepattern.h
bool operator== (const Part & other)
Parameters
Returns
true if this object is equivalent to the other one.
ICU 4.8
Friends
class MessagePattern