Home
last modified time | relevance | path

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

12

/external/icu/icu4j/main/classes/core/src/com/ibm/icu/text/
DMessagePatternUtil.java43 return buildMessageNode(new MessagePattern(patternString)); in buildMessageNode()
54 public static MessageNode buildMessageNode(MessagePattern pattern) { in buildMessageNode()
58 } else if (pattern.getPartType(0) != MessagePattern.Part.Type.MSG_START) { in buildMessageNode()
217 public MessagePattern.ArgType getArgType() { in getArgType()
265 if (argType != MessagePattern.ArgType.NONE) { in toString()
267 if (argType == MessagePattern.ArgType.SIMPLE) { in toString()
285 private MessagePattern.ArgType argType;
303 public MessagePattern.ArgType getArgType() { in getArgType()
379 private ComplexArgStyleNode(MessagePattern.ArgType argType) { in ComplexArgStyleNode()
391 private MessagePattern.ArgType argType;
[all …]
DSelectFormat.java162 transient private MessagePattern msgPattern;
194 msgPattern = new MessagePattern(); in applyPattern()
221 /*package*/ static int findSubMessage(MessagePattern pattern, int partIndex, String keyword) { in findSubMessage()
226 MessagePattern.Part part=pattern.getPart(partIndex++); in findSubMessage()
227 MessagePattern.Part.Type type=part.getType(); in findSubMessage()
228 if(type==MessagePattern.Part.Type.ARG_LIMIT) { in findSubMessage()
231 assert type==MessagePattern.Part.Type.ARG_SELECTOR; in findSubMessage()
273 MessagePattern.Part part = msgPattern.getPart(++i); in format()
274 MessagePattern.Part.Type type = part.getType(); in format()
276 if (type == MessagePattern.Part.Type.MSG_LIMIT) { in format()
[all …]
DPluralFormat.java155 transient private MessagePattern msgPattern;
413 msgPattern = new MessagePattern(); in applyPattern()
445 MessagePattern pattern, int partIndex, in findSubMessage()
449 MessagePattern.Part part=pattern.getPart(partIndex); in findSubMessage()
480 MessagePattern.Part.Type type=part.getType(); in findSubMessage()
481 if(type==MessagePattern.Part.Type.ARG_LIMIT) { in findSubMessage()
484 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.java37 import com.ibm.icu.text.MessagePattern.ArgType;
38 import com.ibm.icu.text.MessagePattern.Part;
452 msgPattern = new MessagePattern(pttrn); in applyPattern()
479 public void applyPattern(String pattern, MessagePattern.ApostropheMode aposMode) { in applyPattern()
481 msgPattern = new MessagePattern(aposMode); in applyPattern()
493 public MessagePattern.ApostropheMode getApostropheMode() { in getApostropheMode()
495 msgPattern = new MessagePattern(); // Sets the default mode. in getApostropheMode()
535 MessagePattern.Part.Type type = msgPattern.getPartType(++partIndex); in nextTopLevelArgStart()
536 if (type == MessagePattern.Part.Type.ARG_START) { in nextTopLevelArgStart()
539 if (type == MessagePattern.Part.Type.MSG_LIMIT) { in nextTopLevelArgStart()
[all …]
DMessagePattern.java80 public final class MessagePattern implements Cloneable, Freezable<MessagePattern> { class
144 public MessagePattern() { in MessagePattern() method in MessagePattern
153 public MessagePattern(ApostropheMode mode) { in MessagePattern() method in MessagePattern
167 public MessagePattern(String pattern) { in MessagePattern() method in MessagePattern
182 public MessagePattern parse(String pattern) { in parse()
199 public MessagePattern parseChoiceStyle(String pattern) { in parseChoiceStyle()
216 public MessagePattern parsePluralStyle(String pattern) { in parsePluralStyle()
233 public MessagePattern parseSelectStyle(String pattern) { in parseSelectStyle()
284 MessagePattern o=(MessagePattern)other; in equals()
876 public MessagePattern cloneAsThawed() { in cloneAsThawed()
[all …]
/external/icu/android_icu4j/src/main/java/android/icu/text/
DMessagePatternUtil.java43 return buildMessageNode(new MessagePattern(patternString)); in buildMessageNode()
53 public static MessageNode buildMessageNode(MessagePattern pattern) { in buildMessageNode()
57 } else if (pattern.getPartType(0) != MessagePattern.Part.Type.MSG_START) { in buildMessageNode()
200 public MessagePattern.ArgType getArgType() { in getArgType()
242 if (argType != MessagePattern.ArgType.NONE) { in toString()
244 if (argType == MessagePattern.ArgType.SIMPLE) { in toString()
262 private MessagePattern.ArgType argType;
278 public MessagePattern.ArgType getArgType() { in getArgType()
349 private ComplexArgStyleNode(MessagePattern.ArgType argType) { in ComplexArgStyleNode()
361 private MessagePattern.ArgType argType;
[all …]
DSelectFormat.java161 transient private MessagePattern msgPattern;
191 msgPattern = new MessagePattern(); in applyPattern()
217 /*package*/ static int findSubMessage(MessagePattern pattern, int partIndex, String keyword) { in findSubMessage()
222 MessagePattern.Part part=pattern.getPart(partIndex++); in findSubMessage()
223 MessagePattern.Part.Type type=part.getType(); in findSubMessage()
224 if(type==MessagePattern.Part.Type.ARG_LIMIT) { in findSubMessage()
227 assert type==MessagePattern.Part.Type.ARG_SELECTOR; in findSubMessage()
268 MessagePattern.Part part = msgPattern.getPart(++i); in format()
269 MessagePattern.Part.Type type = part.getType(); in format()
271 if (type == MessagePattern.Part.Type.MSG_LIMIT) { in format()
[all …]
DPluralFormat.java155 transient private MessagePattern msgPattern;
399 msgPattern = new MessagePattern(); in applyPattern()
430 MessagePattern pattern, int partIndex, in findSubMessage()
434 MessagePattern.Part part=pattern.getPart(partIndex); in findSubMessage()
465 MessagePattern.Part.Type type=part.getType(); in findSubMessage()
466 if(type==MessagePattern.Part.Type.ARG_LIMIT) { in findSubMessage()
469 assert type==MessagePattern.Part.Type.ARG_SELECTOR; in findSubMessage()
612 MessagePattern.Part part = msgPattern.getPart(++partIndex); in format()
613 MessagePattern.Part.Type type = part.getType(); in format()
615 if (type == MessagePattern.Part.Type.MSG_LIMIT) { in format()
[all …]
DMessageFormat.java38 import android.icu.text.MessagePattern.ArgType;
39 import android.icu.text.MessagePattern.Part;
444 msgPattern = new MessagePattern(pttrn); in applyPattern()
470 public void applyPattern(String pattern, MessagePattern.ApostropheMode aposMode) { in applyPattern()
472 msgPattern = new MessagePattern(aposMode); in applyPattern()
483 public MessagePattern.ApostropheMode getApostropheMode() { in getApostropheMode()
485 msgPattern = new MessagePattern(); // Sets the default mode. in getApostropheMode()
524 MessagePattern.Part.Type type = msgPattern.getPartType(++partIndex); in nextTopLevelArgStart()
525 if (type == MessagePattern.Part.Type.ARG_START) { in nextTopLevelArgStart()
528 if (type == MessagePattern.Part.Type.MSG_LIMIT) { in nextTopLevelArgStart()
[all …]
DMessagePattern.java80 public final class MessagePattern implements Cloneable, Freezable<MessagePattern> { class
140 public MessagePattern() { in MessagePattern() method in MessagePattern
148 public MessagePattern(ApostropheMode mode) { in MessagePattern() method in MessagePattern
161 public MessagePattern(String pattern) { in MessagePattern() method in MessagePattern
175 public MessagePattern parse(String pattern) { in parse()
191 public MessagePattern parseChoiceStyle(String pattern) { in parseChoiceStyle()
207 public MessagePattern parsePluralStyle(String pattern) { in parsePluralStyle()
223 public MessagePattern parseSelectStyle(String pattern) { in parseSelectStyle()
271 MessagePattern o=(MessagePattern)other; in equals()
807 public MessagePattern cloneAsThawed() { in cloneAsThawed()
[all …]
/external/icu/icu4c/source/common/
Dmessagepattern.cpp139 class MessagePatternPartsList : public MessagePatternList<MessagePattern::Part, 32> {
144 MessagePattern::MessagePattern(UErrorCode &errorCode) in MessagePattern() function in MessagePattern
152 MessagePattern::MessagePattern(UMessagePatternApostropheMode mode, UErrorCode &errorCode) in MessagePattern() function in MessagePattern
160 MessagePattern::MessagePattern(const UnicodeString &pattern, UParseError *parseError, UErrorCode &e… in MessagePattern() function in MessagePattern
171 MessagePattern::init(UErrorCode &errorCode) { in init()
184 MessagePattern::MessagePattern(const MessagePattern &other) in MessagePattern() function in MessagePattern
196 MessagePattern &
197 MessagePattern::operator=(const MessagePattern &other) { in operator =()
214 MessagePattern::copyStorage(const MessagePattern &other, UErrorCode &errorCode) { in copyStorage()
258 MessagePattern::~MessagePattern() { in ~MessagePattern()
[all …]
Dmessageimpl.h36 static UBool jdkAposMode(const MessagePattern &msgPattern) { in jdkAposMode()
51 static UnicodeString &appendSubMessageWithoutSkipSyntax(const MessagePattern &msgPattern,
/external/icu/icu4j/samples/src/com/ibm/icu/samples/text/messagepattern/
DMessagePatternDemo.java12 import com.ibm.icu.text.MessagePattern;
24 private static final void printParts(MessagePattern msg) { in printParts()
31 MessagePattern.Part prevPart=null; in printParts()
35 MessagePattern.Part part=msg.getPart(i); in printParts()
38 MessagePattern.Part.Type type=part.getType(); in printParts()
39 if(type==MessagePattern.Part.Type.MSG_START) { in printParts()
49 if(type==MessagePattern.Part.Type.MSG_LIMIT) { in printParts()
61 private static final MessagePattern print(String s) { in print()
64 MessagePattern msg=new MessagePattern(s); in print()
74 MessagePattern msg=print(s); in printFormat()
[all …]
DMiniMessageFormatter.java16 import com.ibm.icu.text.MessagePattern;
17 import com.ibm.icu.text.MessagePattern.ArgType;
18 import com.ibm.icu.text.MessagePattern.Part;
29 this.msg=new MessagePattern(); in MiniMessageFormatter()
32 public MiniMessageFormatter(MessagePattern msg) { in MiniMessageFormatter()
33 this.msg=(MessagePattern)msg.clone(); in MiniMessageFormatter()
37 this.msg=new MessagePattern(msg); in MiniMessageFormatter()
185 private final MessagePattern msg;
DMessagePatternUtilDemo.java15 import com.ibm.icu.text.MessagePattern;
47 MessagePattern.ArgType argType = arg.getArgType(); in printArg()
48 if (argType == MessagePattern.ArgType.NONE) { in printArg()
52 if (argType == MessagePattern.ArgType.SIMPLE) { in printArg()
72 MessagePattern.ArgType argType = style.getArgType(); in printComplexArgStyle()
82 if (value == MessagePattern.NO_NUMERIC_VALUE) { in printComplexArgStyle()
/external/messageformat/java/com/ibm/icu/text/
DSelectFormat.java163 transient private MessagePattern msgPattern;
195 msgPattern = new MessagePattern(); in applyPattern()
222 public static int findSubMessage(MessagePattern pattern, int partIndex, String keyword) { in findSubMessage()
227 MessagePattern.Part part=pattern.getPart(partIndex++); in findSubMessage()
228 MessagePattern.Part.Type type=part.getType(); in findSubMessage()
229 if(type==MessagePattern.Part.Type.ARG_LIMIT) { in findSubMessage()
232 assert type==MessagePattern.Part.Type.ARG_SELECTOR; in findSubMessage()
274 MessagePattern.Part part = msgPattern.getPart(++i); in format()
275 MessagePattern.Part.Type type = part.getType(); in format()
277 if (type == MessagePattern.Part.Type.MSG_LIMIT) { in format()
[all …]
DMessagePattern.java79 public final class MessagePattern implements Cloneable, Freezable<MessagePattern> { class
143 public MessagePattern() { in MessagePattern() method in MessagePattern
152 public MessagePattern(ApostropheMode mode) { in MessagePattern() method in MessagePattern
166 public MessagePattern(String pattern) { in MessagePattern() method in MessagePattern
181 public MessagePattern parse(String pattern) { in parse()
198 public MessagePattern parseChoiceStyle(String pattern) { in parseChoiceStyle()
215 public MessagePattern parsePluralStyle(String pattern) { in parsePluralStyle()
232 public MessagePattern parseSelectStyle(String pattern) { in parseSelectStyle()
283 MessagePattern o=(MessagePattern)other; in equals()
875 public MessagePattern cloneAsThawed() { in cloneAsThawed()
[all …]
/external/icu/icu4c/source/common/unicode/
Dmessagepattern.h358 class U_COMMON_API MessagePattern : public UObject {
368 MessagePattern(UErrorCode &errorCode);
379 MessagePattern(UMessagePatternApostropheMode mode, UErrorCode &errorCode);
399 MessagePattern(const UnicodeString &pattern, UParseError *parseError, UErrorCode &errorCode);
406 MessagePattern(const MessagePattern &other);
414 MessagePattern &operator=(const MessagePattern &other);
420 virtual ~MessagePattern();
439 MessagePattern &parse(const UnicodeString &pattern,
459 MessagePattern &parseChoiceStyle(const UnicodeString &pattern,
479 MessagePattern &parsePluralStyle(const UnicodeString &pattern,
[all …]
/external/messageformat/java/com/ibm/icu/simple/
DPluralFormat.java19 import com.ibm.icu.text.MessagePattern;
156 transient private MessagePattern msgPattern;
255 msgPattern = new MessagePattern(); in applyPattern()
287 MessagePattern pattern, int partIndex, in findSubMessage()
291 MessagePattern.Part part=pattern.getPart(partIndex); in findSubMessage()
322 MessagePattern.Part.Type type=part.getType(); in findSubMessage()
323 if(type==MessagePattern.Part.Type.ARG_LIMIT) { in findSubMessage()
326 assert type==MessagePattern.Part.Type.ARG_SELECTOR; in findSubMessage()
DMessageFormat.java40 import com.ibm.icu.text.MessagePattern;
41 import com.ibm.icu.text.MessagePattern.ArgType;
42 import com.ibm.icu.text.MessagePattern.Part;
409 msgPattern = new MessagePattern(pttrn); in applyPattern()
436 public void applyPattern(String pattern, MessagePattern.ApostropheMode aposMode) { in applyPattern()
438 msgPattern = new MessagePattern(aposMode); in applyPattern()
450 public MessagePattern.ApostropheMode getApostropheMode() { in getApostropheMode()
452 msgPattern = new MessagePattern(); // Sets the default mode. in getApostropheMode()
492 MessagePattern.Part.Type type = msgPattern.getPartType(++partIndex); in nextTopLevelArgStart()
493 if (type == MessagePattern.Part.Type.ARG_START) { in nextTopLevelArgStart()
[all …]
/external/icu/android_icu4j/src/main/tests/android/icu/dev/test/format/
DMessagePatternUtilTest.java18 import android.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.java32 import android.icu.text.MessagePattern;
1719 public String getPatternAndSkipSyntax(MessagePattern pattern) { in getPatternAndSkipSyntax()
1723 MessagePattern.Part part = pattern.getPart(--i); in getPatternAndSkipSyntax()
1724 if (part.getType() == MessagePattern.Part.Type.SKIP_SYNTAX) { in getPatternAndSkipSyntax()
1732 MessagePattern ado_mp = new MessagePattern(MessagePattern.ApostropheMode.DOUBLE_OPTIONAL); in TestApostropheMode()
1733 MessagePattern adr_mp = new MessagePattern(MessagePattern.ApostropheMode.DOUBLE_REQUIRED); in TestApostropheMode()
1735 MessagePattern.ApostropheMode.DOUBLE_OPTIONAL, in TestApostropheMode()
1738 MessagePattern.ApostropheMode.DOUBLE_REQUIRED, in TestApostropheMode()
1777 compMsg.applyPattern(pattern, MessagePattern.ApostropheMode.DOUBLE_REQUIRED); in TestCompatibleApostrophe()
1779 MessagePattern.ApostropheMode.DOUBLE_REQUIRED, in TestCompatibleApostrophe()
[all …]
/external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/
DMessagePatternUtilTest.java17 import com.ibm.icu.text.MessagePattern;
61 return expectComplexArg(name, MessagePattern.ArgType.CHOICE); in expectChoiceArg()
64 return expectComplexArg(name, MessagePattern.ArgType.PLURAL); in expectPluralArg()
67 return expectComplexArg(name, MessagePattern.ArgType.SELECT); in expectSelectArg()
70 return expectComplexArg(name, MessagePattern.ArgType.SELECTORDINAL); in expectSelectOrdinalArg()
72 private ExpectComplexArgNode expectComplexArg(Object name, MessagePattern.ArgType argType) { in expectComplexArg()
146 argType = MessagePattern.ArgType.NONE; in ExpectArgNode()
148 argType = MessagePattern.ArgType.SIMPLE; in ExpectArgNode()
172 … if (argType == MessagePattern.ArgType.NONE || argType == MessagePattern.ArgType.SIMPLE) { in matches()
179 protected MessagePattern.ArgType argType;
[all …]
DTestMessageFormat.java31 import com.ibm.icu.text.MessagePattern;
1715 public String getPatternAndSkipSyntax(MessagePattern pattern) { in getPatternAndSkipSyntax()
1719 MessagePattern.Part part = pattern.getPart(--i); in getPatternAndSkipSyntax()
1720 if (part.getType() == MessagePattern.Part.Type.SKIP_SYNTAX) { in getPatternAndSkipSyntax()
1728 MessagePattern ado_mp = new MessagePattern(MessagePattern.ApostropheMode.DOUBLE_OPTIONAL); in TestApostropheMode()
1729 MessagePattern adr_mp = new MessagePattern(MessagePattern.ApostropheMode.DOUBLE_REQUIRED); in TestApostropheMode()
1731 MessagePattern.ApostropheMode.DOUBLE_OPTIONAL, in TestApostropheMode()
1734 MessagePattern.ApostropheMode.DOUBLE_REQUIRED, in TestApostropheMode()
1773 compMsg.applyPattern(pattern, MessagePattern.ApostropheMode.DOUBLE_REQUIRED); in TestCompatibleApostrophe()
1775 MessagePattern.ApostropheMode.DOUBLE_REQUIRED, in TestCompatibleApostrophe()
[all …]
/external/icu/icu4c/source/i18n/unicode/
Dchoicfmt.h507 static int32_t findSubMessage(const MessagePattern &pattern, int32_t partIndex, double number);
510 const MessagePattern &pattern, int32_t partIndex,
522 const MessagePattern &pattern, int32_t partIndex, int32_t limitPartIndex,
540 MessagePattern msgPattern;

12