Home
last modified time | relevance | path

Searched refs:MessagePattern (Results 1 – 25 of 47) sorted by relevance

12

/external/icu/android_icu4j/src/main/java/android/icu/text/
DMessagePatternUtil.java45 return buildMessageNode(new MessagePattern(patternString)); in buildMessageNode()
55 public static MessageNode buildMessageNode(MessagePattern pattern) { in buildMessageNode()
59 } else if (pattern.getPartType(0) != MessagePattern.Part.Type.MSG_START) { in buildMessageNode()
208 public MessagePattern.ArgType getArgType() { in getArgType()
250 if (argType != MessagePattern.ArgType.NONE) { in toString()
252 if (argType == MessagePattern.ArgType.SIMPLE) { in toString()
270 private MessagePattern.ArgType argType;
287 public MessagePattern.ArgType getArgType() { in getArgType()
358 private ComplexArgStyleNode(MessagePattern.ArgType argType) { in ComplexArgStyleNode()
370 private MessagePattern.ArgType argType;
[all …]
DSelectFormat.java163 transient private MessagePattern msgPattern;
193 msgPattern = new MessagePattern(); in applyPattern()
219 /*package*/ static int findSubMessage(MessagePattern pattern, int partIndex, String keyword) { in findSubMessage()
224 MessagePattern.Part part=pattern.getPart(partIndex++); in findSubMessage()
225 MessagePattern.Part.Type type=part.getType(); in findSubMessage()
226 if(type==MessagePattern.Part.Type.ARG_LIMIT) { in findSubMessage()
229 assert type==MessagePattern.Part.Type.ARG_SELECTOR; in findSubMessage()
270 MessagePattern.Part part = msgPattern.getPart(++i); in format()
271 MessagePattern.Part.Type type = part.getType(); in format()
273 if (type == MessagePattern.Part.Type.MSG_LIMIT) { in format()
[all …]
DPluralFormat.java160 transient private MessagePattern msgPattern;
404 msgPattern = new MessagePattern(); in applyPattern()
435 MessagePattern pattern, int partIndex, in findSubMessage()
439 MessagePattern.Part part=pattern.getPart(partIndex); in findSubMessage()
470 MessagePattern.Part.Type type=part.getType(); in findSubMessage()
471 if(type==MessagePattern.Part.Type.ARG_LIMIT) { in findSubMessage()
474 assert type==MessagePattern.Part.Type.ARG_SELECTOR; in findSubMessage()
629 MessagePattern.Part part = msgPattern.getPart(++partIndex); in format()
630 MessagePattern.Part.Type type = part.getType(); in format()
632 if (type == MessagePattern.Part.Type.MSG_LIMIT) { in format()
[all …]
DMessageFormat.java41 import android.icu.text.MessagePattern.ArgType;
42 import android.icu.text.MessagePattern.Part;
447 msgPattern = new MessagePattern(pttrn); in applyPattern()
473 public void applyPattern(String pattern, MessagePattern.ApostropheMode aposMode) { in applyPattern()
475 msgPattern = new MessagePattern(aposMode); in applyPattern()
486 public MessagePattern.ApostropheMode getApostropheMode() { in getApostropheMode()
488 msgPattern = new MessagePattern(); // Sets the default mode. in getApostropheMode()
527 MessagePattern.Part.Type type = msgPattern.getPartType(++partIndex); in nextTopLevelArgStart()
528 if (type == MessagePattern.Part.Type.ARG_START) { in nextTopLevelArgStart()
531 if (type == MessagePattern.Part.Type.MSG_LIMIT) { in nextTopLevelArgStart()
[all …]
DMessagePattern.java82 public final class MessagePattern implements Cloneable, Freezable<MessagePattern> { class
142 public MessagePattern() { in MessagePattern() method in MessagePattern
150 public MessagePattern(ApostropheMode mode) { in MessagePattern() method in MessagePattern
163 public MessagePattern(String pattern) { in MessagePattern() method in MessagePattern
177 public MessagePattern parse(String pattern) { in parse()
193 public MessagePattern parseChoiceStyle(String pattern) { in parseChoiceStyle()
209 public MessagePattern parsePluralStyle(String pattern) { in parsePluralStyle()
225 public MessagePattern parseSelectStyle(String pattern) { in parseSelectStyle()
273 MessagePattern o=(MessagePattern)other; in equals()
810 public MessagePattern cloneAsThawed() { in cloneAsThawed()
[all …]
/external/icu/icu4j/main/classes/core/src/com/ibm/icu/text/
DMessagePatternUtil.java45 return buildMessageNode(new MessagePattern(patternString)); in buildMessageNode()
56 public static MessageNode buildMessageNode(MessagePattern pattern) { in buildMessageNode()
60 } else if (pattern.getPartType(0) != MessagePattern.Part.Type.MSG_START) { in buildMessageNode()
219 public MessagePattern.ArgType getArgType() { in getArgType()
267 if (argType != MessagePattern.ArgType.NONE) { in toString()
269 if (argType == MessagePattern.ArgType.SIMPLE) { in toString()
287 private MessagePattern.ArgType argType;
305 public MessagePattern.ArgType getArgType() { in getArgType()
381 private ComplexArgStyleNode(MessagePattern.ArgType argType) { in ComplexArgStyleNode()
393 private MessagePattern.ArgType argType;
[all …]
DSelectFormat.java164 transient private MessagePattern msgPattern;
196 msgPattern = new MessagePattern(); in applyPattern()
223 /*package*/ static int findSubMessage(MessagePattern pattern, int partIndex, String keyword) { in findSubMessage()
228 MessagePattern.Part part=pattern.getPart(partIndex++); in findSubMessage()
229 MessagePattern.Part.Type type=part.getType(); in findSubMessage()
230 if(type==MessagePattern.Part.Type.ARG_LIMIT) { in findSubMessage()
233 assert type==MessagePattern.Part.Type.ARG_SELECTOR; in findSubMessage()
275 MessagePattern.Part part = msgPattern.getPart(++i); in format()
276 MessagePattern.Part.Type type = part.getType(); in format()
278 if (type == MessagePattern.Part.Type.MSG_LIMIT) { in format()
[all …]
DPluralFormat.java160 transient private MessagePattern msgPattern;
418 msgPattern = new MessagePattern(); in applyPattern()
450 MessagePattern pattern, int partIndex, in findSubMessage()
454 MessagePattern.Part part=pattern.getPart(partIndex); in findSubMessage()
485 MessagePattern.Part.Type type=part.getType(); in findSubMessage()
486 if(type==MessagePattern.Part.Type.ARG_LIMIT) { in findSubMessage()
489 assert type==MessagePattern.Part.Type.ARG_SELECTOR; in findSubMessage()
646 MessagePattern.Part part = msgPattern.getPart(++partIndex); in format()
647 MessagePattern.Part.Type type = part.getType(); in format()
649 if (type == MessagePattern.Part.Type.MSG_LIMIT) { in format()
[all …]
DMessageFormat.java40 import com.ibm.icu.text.MessagePattern.ArgType;
41 import com.ibm.icu.text.MessagePattern.Part;
458 msgPattern = new MessagePattern(pttrn); in applyPattern()
485 public void applyPattern(String pattern, MessagePattern.ApostropheMode aposMode) { in applyPattern()
487 msgPattern = new MessagePattern(aposMode); in applyPattern()
499 public MessagePattern.ApostropheMode getApostropheMode() { in getApostropheMode()
501 msgPattern = new MessagePattern(); // Sets the default mode. in getApostropheMode()
541 MessagePattern.Part.Type type = msgPattern.getPartType(++partIndex); in nextTopLevelArgStart()
542 if (type == MessagePattern.Part.Type.ARG_START) { in nextTopLevelArgStart()
545 if (type == MessagePattern.Part.Type.MSG_LIMIT) { in nextTopLevelArgStart()
[all …]
DMessagePattern.java82 public final class MessagePattern implements Cloneable, Freezable<MessagePattern> { class
146 public MessagePattern() { in MessagePattern() method in MessagePattern
155 public MessagePattern(ApostropheMode mode) { in MessagePattern() method in MessagePattern
169 public MessagePattern(String pattern) { in MessagePattern() method in MessagePattern
184 public MessagePattern parse(String pattern) { in parse()
201 public MessagePattern parseChoiceStyle(String pattern) { in parseChoiceStyle()
218 public MessagePattern parsePluralStyle(String pattern) { in parsePluralStyle()
235 public MessagePattern parseSelectStyle(String pattern) { in parseSelectStyle()
286 MessagePattern o=(MessagePattern)other; in equals()
879 public MessagePattern cloneAsThawed() { in cloneAsThawed()
[all …]
/external/icu/icu4c/source/common/
Dmessagepattern.cpp141 class MessagePatternPartsList : public MessagePatternList<MessagePattern::Part, 32> {
146 MessagePattern::MessagePattern(UErrorCode &errorCode) in MessagePattern() function in MessagePattern
154 MessagePattern::MessagePattern(UMessagePatternApostropheMode mode, UErrorCode &errorCode) in MessagePattern() function in MessagePattern
162 MessagePattern::MessagePattern(const UnicodeString &pattern, UParseError *parseError, UErrorCode &e… in MessagePattern() function in MessagePattern
173 MessagePattern::init(UErrorCode &errorCode) { in init()
186 MessagePattern::MessagePattern(const MessagePattern &other) in MessagePattern() function in MessagePattern
198 MessagePattern &
199 MessagePattern::operator=(const MessagePattern &other) { in operator =()
216 MessagePattern::copyStorage(const MessagePattern &other, UErrorCode &errorCode) { in copyStorage()
260 MessagePattern::~MessagePattern() { in ~MessagePattern()
[all …]
Dmessageimpl.h38 static UBool jdkAposMode(const MessagePattern &msgPattern) { in jdkAposMode()
53 static UnicodeString &appendSubMessageWithoutSkipSyntax(const MessagePattern &msgPattern,
/external/icu/icu4j/samples/src/com/ibm/icu/samples/text/messagepattern/
DMessagePatternDemo.java14 import com.ibm.icu.text.MessagePattern;
26 private static final void printParts(MessagePattern msg) { in printParts()
33 MessagePattern.Part prevPart=null; in printParts()
37 MessagePattern.Part part=msg.getPart(i); in printParts()
40 MessagePattern.Part.Type type=part.getType(); in printParts()
41 if(type==MessagePattern.Part.Type.MSG_START) { in printParts()
51 if(type==MessagePattern.Part.Type.MSG_LIMIT) { in printParts()
63 private static final MessagePattern print(String s) { in print()
66 MessagePattern msg=new MessagePattern(s); in print()
76 MessagePattern msg=print(s); in printFormat()
[all …]
DMiniMessageFormatter.java18 import com.ibm.icu.text.MessagePattern;
19 import com.ibm.icu.text.MessagePattern.ArgType;
20 import com.ibm.icu.text.MessagePattern.Part;
31 this.msg=new MessagePattern(); in MiniMessageFormatter()
34 public MiniMessageFormatter(MessagePattern msg) { in MiniMessageFormatter()
35 this.msg=(MessagePattern)msg.clone(); in MiniMessageFormatter()
39 this.msg=new MessagePattern(msg); in MiniMessageFormatter()
187 private final MessagePattern msg;
DMessagePatternUtilDemo.java17 import com.ibm.icu.text.MessagePattern;
49 MessagePattern.ArgType argType = arg.getArgType(); in printArg()
50 if (argType == MessagePattern.ArgType.NONE) { in printArg()
54 if (argType == MessagePattern.ArgType.SIMPLE) { in printArg()
74 MessagePattern.ArgType argType = style.getArgType(); in printComplexArgStyle()
84 if (value == MessagePattern.NO_NUMERIC_VALUE) { in printComplexArgStyle()
/external/icu/icu4c/source/common/unicode/
Dmessagepattern.h360 class U_COMMON_API MessagePattern : public UObject {
370 MessagePattern(UErrorCode &errorCode);
381 MessagePattern(UMessagePatternApostropheMode mode, UErrorCode &errorCode);
401 MessagePattern(const UnicodeString &pattern, UParseError *parseError, UErrorCode &errorCode);
408 MessagePattern(const MessagePattern &other);
416 MessagePattern &operator=(const MessagePattern &other);
422 virtual ~MessagePattern();
441 MessagePattern &parse(const UnicodeString &pattern,
461 MessagePattern &parseChoiceStyle(const UnicodeString &pattern,
481 MessagePattern &parsePluralStyle(const UnicodeString &pattern,
[all …]
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/
DMessagePatternUtilTest.java24 import com.ibm.icu.text.MessagePattern;
65 return expectComplexArg(name, MessagePattern.ArgType.CHOICE); in expectChoiceArg()
68 return expectComplexArg(name, MessagePattern.ArgType.PLURAL); in expectPluralArg()
71 return expectComplexArg(name, MessagePattern.ArgType.SELECT); in expectSelectArg()
74 return expectComplexArg(name, MessagePattern.ArgType.SELECTORDINAL); in expectSelectOrdinalArg()
76 private ExpectComplexArgNode expectComplexArg(Object name, MessagePattern.ArgType argType) { in expectComplexArg()
150 argType = MessagePattern.ArgType.NONE; in ExpectArgNode()
152 argType = MessagePattern.ArgType.SIMPLE; in ExpectArgNode()
176 … if (argType == MessagePattern.ArgType.NONE || argType == MessagePattern.ArgType.SIMPLE) { in matches()
183 protected MessagePattern.ArgType argType;
[all …]
DTestMessageFormat.java39 import com.ibm.icu.text.MessagePattern;
1756 public String getPatternAndSkipSyntax(MessagePattern pattern) { in getPatternAndSkipSyntax()
1760 MessagePattern.Part part = pattern.getPart(--i); in getPatternAndSkipSyntax()
1761 if (part.getType() == MessagePattern.Part.Type.SKIP_SYNTAX) { in getPatternAndSkipSyntax()
1770 MessagePattern ado_mp = new MessagePattern(MessagePattern.ApostropheMode.DOUBLE_OPTIONAL); in TestApostropheMode()
1771 MessagePattern adr_mp = new MessagePattern(MessagePattern.ApostropheMode.DOUBLE_REQUIRED); in TestApostropheMode()
1773 MessagePattern.ApostropheMode.DOUBLE_OPTIONAL, in TestApostropheMode()
1776 MessagePattern.ApostropheMode.DOUBLE_REQUIRED, in TestApostropheMode()
1816 compMsg.applyPattern(pattern, MessagePattern.ApostropheMode.DOUBLE_REQUIRED); in TestCompatibleApostrophe()
1818 MessagePattern.ApostropheMode.DOUBLE_REQUIRED, in TestCompatibleApostrophe()
[all …]
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/format/
DMessagePatternUtilTest.java25 import android.icu.text.MessagePattern;
68 return expectComplexArg(name, MessagePattern.ArgType.CHOICE); in expectChoiceArg()
71 return expectComplexArg(name, MessagePattern.ArgType.PLURAL); in expectPluralArg()
74 return expectComplexArg(name, MessagePattern.ArgType.SELECT); in expectSelectArg()
77 return expectComplexArg(name, MessagePattern.ArgType.SELECTORDINAL); in expectSelectOrdinalArg()
79 private ExpectComplexArgNode expectComplexArg(Object name, MessagePattern.ArgType argType) { in expectComplexArg()
153 argType = MessagePattern.ArgType.NONE; in ExpectArgNode()
155 argType = MessagePattern.ArgType.SIMPLE; in ExpectArgNode()
179 … if (argType == MessagePattern.ArgType.NONE || argType == MessagePattern.ArgType.SIMPLE) { in matches()
186 protected MessagePattern.ArgType argType;
[all …]
DTestMessageFormat.java40 import android.icu.text.MessagePattern;
1759 public String getPatternAndSkipSyntax(MessagePattern pattern) { in getPatternAndSkipSyntax()
1763 MessagePattern.Part part = pattern.getPart(--i); in getPatternAndSkipSyntax()
1764 if (part.getType() == MessagePattern.Part.Type.SKIP_SYNTAX) { in getPatternAndSkipSyntax()
1773 MessagePattern ado_mp = new MessagePattern(MessagePattern.ApostropheMode.DOUBLE_OPTIONAL); in TestApostropheMode()
1774 MessagePattern adr_mp = new MessagePattern(MessagePattern.ApostropheMode.DOUBLE_REQUIRED); in TestApostropheMode()
1776 MessagePattern.ApostropheMode.DOUBLE_OPTIONAL, in TestApostropheMode()
1779 MessagePattern.ApostropheMode.DOUBLE_REQUIRED, in TestApostropheMode()
1819 compMsg.applyPattern(pattern, MessagePattern.ApostropheMode.DOUBLE_REQUIRED); in TestCompatibleApostrophe()
1821 MessagePattern.ApostropheMode.DOUBLE_REQUIRED, in TestCompatibleApostrophe()
[all …]
/external/icu/icu4c/source/i18n/unicode/
Dchoicfmt.h509 static int32_t findSubMessage(const MessagePattern &pattern, int32_t partIndex, double number);
512 const MessagePattern &pattern, int32_t partIndex,
524 const MessagePattern &pattern, int32_t partIndex, int32_t limitPartIndex,
542 MessagePattern msgPattern;
Dselfmt.h358 static int32_t findSubMessage(const MessagePattern& pattern, int32_t partIndex,
361 MessagePattern msgPattern;
/external/icu/icu4c/source/i18n/
Dchoicfmt.cpp425 ChoiceFormat::findSubMessage(const MessagePattern &pattern, int32_t partIndex, double number) { in findSubMessage()
441 const MessagePattern::Part &part = pattern.getPart(partIndex++); in findSubMessage()
449 U_ASSERT(MessagePattern::Part::hasNumericValue(type)); in findSubMessage()
507 const MessagePattern &pattern, int32_t partIndex, in parseArgument()
542 const MessagePattern &pattern, int32_t partIndex, int32_t limitPartIndex, in matchStringUntilLimitPart()
548 const MessagePattern::Part &part = pattern.getPart(++partIndex); in matchStringUntilLimitPart()
Dplurfmt.cpp297 const MessagePattern::Part& part = msgPattern.getPart(++partIndex); in format()
410 int32_t PluralFormat::findSubMessage(const MessagePattern& pattern, int32_t partIndex, in findSubMessage()
418 const MessagePattern::Part* part=&pattern.getPart(partIndex); in findSubMessage()
419 if (MessagePattern::Part::hasNumericValue(part->getType())) { in findSubMessage()
456 if(MessagePattern::Part::hasNumericValue(pattern.getPartType(partIndex))) { in findSubMessage()
525 const MessagePattern::Part* partSelector = &msgPattern.getPart(partIndex++); in parseType()
531 const MessagePattern::Part* partStart = &msgPattern.getPart(partIndex++); in parseType()
537 const MessagePattern::Part* partLimit = &msgPattern.getPart(partIndex++); in parseType()
Dmsgfmt.cpp574 const MessagePattern::Part& part = msgPattern.getPart(partIndex); in argNameMatches()
706 int32_t argNumber = MessagePattern::validateArgumentName(formatName); in adoptFormat()
762 int32_t argNumber = MessagePattern::validateArgumentName(formatName); in getFormat()
784 int32_t argNumber = MessagePattern::validateArgumentName(formatName); in setFormat()
844 const MessagePattern::Part& part = msgPattern.getPart(partIndex); in getArgName()
1016 const MessagePattern::Part* part = &msgPattern.getPart(i); in format()
1182 const MessagePattern::Part& part = msgPattern.getPart(++i); in formatComplexSubMessage()
1227 const MessagePattern::Part& part = msgPattern.getPart(i); in getLiteralStringUntilNextArgument()
1258 const MessagePattern::Part *part = &msgPattern.getPart(partIndex); in findOtherSubMessage()
1259 if(MessagePattern::Part::hasNumericValue(part->getType())) { in findOtherSubMessage()
[all …]

12