HomeSort by relevance Sort by last modified time
    Searched refs:MessagePattern (Results 1 - 25 of 42) sorted by null

1 2

  /external/icu/icu4c/source/common/
messageimpl.h 22 #include "unicode/messagepattern.h"
27 * Helper functions for use of MessagePattern.
28 * In Java, these are package-private methods in MessagePattern itself.
29 * In C++, they are declared here and implemented in messagepattern.cpp.
36 static UBool jdkAposMode(const MessagePattern &msgPattern) {
51 static UnicodeString &appendSubMessageWithoutSkipSyntax(const MessagePattern &msgPattern,
messagepattern.cpp 6 * file name: messagepattern.cpp
19 #include "unicode/messagepattern.h"
139 class MessagePatternPartsList : public MessagePatternList<MessagePattern::Part, 32> {
142 // MessagePattern constructors etc. ---------------------------------------- ***
144 MessagePattern::MessagePattern(UErrorCode &errorCode)
152 MessagePattern::MessagePattern(UMessagePatternApostropheMode mode, UErrorCode &errorCode)
160 MessagePattern::MessagePattern(const UnicodeString &pattern, UParseError *parseError, UErrorCode &errorCode
    [all...]
  /external/icu/icu4j/samples/src/com/ibm/icu/samples/text/messagepattern/
MessagePatternDemo.java 10 package com.ibm.icu.samples.text.messagepattern;
12 import com.ibm.icu.text.MessagePattern;
15 * Demo code for MessagePattern class.
16 * Pretty-prints the list of MessagePattern Parts and uses the MiniMessageFormatter
24 private static final void printParts(MessagePattern msg) {
31 MessagePattern.Part prevPart=null;
35 MessagePattern.Part part=msg.getPart(i);
38 MessagePattern.Part.Type type=part.getType();
39 if(type==MessagePattern.Part.Type.MSG_START) {
49 if(type==MessagePattern.Part.Type.MSG_LIMIT)
    [all...]
MiniMessageFormatter.java 10 package com.ibm.icu.samples.text.messagepattern;
16 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();
32 public MiniMessageFormatter(MessagePattern msg) {
33 this.msg=(MessagePattern)msg.clone();
37 this.msg=new MessagePattern(msg);
185 private final MessagePattern msg;
MessagePatternUtilDemo.java 10 package com.ibm.icu.samples.text.messagepattern;
15 import com.ibm.icu.text.MessagePattern;
20 * Demo code for MessagePattern class.
47 MessagePattern.ArgType argType = arg.getArgType();
48 if (argType == MessagePattern.ArgType.NONE) {
52 if (argType == MessagePattern.ArgType.SIMPLE) {
72 MessagePattern.ArgType argType = style.getArgType();
82 if (value == MessagePattern.NO_NUMERIC_VALUE) {
  /external/icu/android_icu4j/src/main/java/android/icu/text/
SelectFormat.java 159 * The MessagePattern which contains the parsed structure of the pattern string.
161 transient private MessagePattern msgPattern;
191 msgPattern = new MessagePattern();
212 * @param pattern A MessagePattern.
217 /*package*/ static int findSubMessage(MessagePattern pattern, int partIndex, String keyword) {
222 MessagePattern.Part part=pattern.getPart(partIndex++);
223 MessagePattern.Part.Type type=part.getType();
224 if(type==MessagePattern.Part.Type.ARG_LIMIT) {
227 assert type==MessagePattern.Part.Type.ARG_SELECTOR;
268 MessagePattern.Part part = msgPattern.getPart(++i)
    [all...]
MessagePatternUtil.java 18 * Utilities for working with a MessagePattern.
39 * @throws IllegalArgumentException if the MessagePattern is empty
43 return buildMessageNode(new MessagePattern(patternString));
47 * Factory method, builds and returns a MessageNode from a MessagePattern.
50 * @throws IllegalArgumentException if the MessagePattern is empty
53 public static MessageNode buildMessageNode(MessagePattern pattern) {
56 throw new IllegalArgumentException("The MessagePattern is empty");
57 } else if (pattern.getPartType(0) != MessagePattern.Part.Type.MSG_START) {
59 "The MessagePattern does not represent a MessageFormat pattern");
66 * returned by {@link MessagePatternUtil#buildMessageNode(MessagePattern)}
    [all...]
PluralFormat.java 153 * The MessagePattern which contains the parsed structure of the pattern string.
155 transient private MessagePattern msgPattern;
158 * Obsolete with use of MessagePattern since ICU 4.8. Used to be:
399 msgPattern = new MessagePattern();
421 * @param pattern A MessagePattern.
430 MessagePattern pattern, int partIndex,
434 MessagePattern.Part part=pattern.getPart(partIndex);
465 MessagePattern.Part.Type type=part.getType();
466 if(type==MessagePattern.Part.Type.ARG_LIMIT) {
469 assert type==MessagePattern.Part.Type.ARG_SELECTOR
    [all...]
MessagePattern.java 80 public final class MessagePattern implements Cloneable, Freezable<MessagePattern> {
138 * Constructs an empty MessagePattern with default ApostropheMode.
140 public MessagePattern() {
145 * Constructs an empty MessagePattern.
148 public MessagePattern(ApostropheMode mode) {
153 * Constructs a MessagePattern with default ApostropheMode and
161 public MessagePattern(String pattern) {
175 public MessagePattern parse(String pattern) {
191 public MessagePattern parseChoiceStyle(String pattern)
    [all...]
MessageFormat.java 38 import android.icu.text.MessagePattern.ArgType;
39 import android.icu.text.MessagePattern.Part;
136 * <li>See also {@link MessagePattern.ApostropheMode}
247 * For more details see {@link MessagePattern.ApostropheMode}.
444 msgPattern = new MessagePattern(pttrn);
468 * @see MessagePattern.ApostropheMode
470 public void applyPattern(String pattern, MessagePattern.ApostropheMode aposMode) {
472 msgPattern = new MessagePattern(aposMode);
483 public MessagePattern.ApostropheMode getApostropheMode() {
485 msgPattern = new MessagePattern(); // Sets the default mode
    [all...]
  /external/icu/icu4j/main/classes/core/src/com/ibm/icu/text/
SelectFormat.java 160 * The MessagePattern which contains the parsed structure of the pattern string.
162 transient private MessagePattern msgPattern;
194 msgPattern = new MessagePattern();
216 * @param pattern A MessagePattern.
221 /*package*/ static int findSubMessage(MessagePattern pattern, int partIndex, String keyword) {
226 MessagePattern.Part part=pattern.getPart(partIndex++);
227 MessagePattern.Part.Type type=part.getType();
228 if(type==MessagePattern.Part.Type.ARG_LIMIT) {
231 assert type==MessagePattern.Part.Type.ARG_SELECTOR;
273 MessagePattern.Part part = msgPattern.getPart(++i)
    [all...]
MessagePatternUtil.java 17 * Utilities for working with a MessagePattern.
38 * @throws IllegalArgumentException if the MessagePattern is empty
43 return buildMessageNode(new MessagePattern(patternString));
47 * Factory method, builds and returns a MessageNode from a MessagePattern.
50 * @throws IllegalArgumentException if the MessagePattern is empty
54 public static MessageNode buildMessageNode(MessagePattern pattern) {
57 throw new IllegalArgumentException("The MessagePattern is empty");
58 } else if (pattern.getPartType(0) != MessagePattern.Part.Type.MSG_START) {
60 "The MessagePattern does not represent a MessageFormat pattern");
67 * returned by {@link MessagePatternUtil#buildMessageNode(MessagePattern)}
    [all...]
PluralFormat.java 153 * The MessagePattern which contains the parsed structure of the pattern string.
155 transient private MessagePattern msgPattern;
158 * Obsolete with use of MessagePattern since ICU 4.8. Used to be:
413 msgPattern = new MessagePattern();
436 * @param pattern A MessagePattern.
445 MessagePattern pattern, int partIndex,
449 MessagePattern.Part part=pattern.getPart(partIndex);
480 MessagePattern.Part.Type type=part.getType();
481 if(type==MessagePattern.Part.Type.ARG_LIMIT) {
484 assert type==MessagePattern.Part.Type.ARG_SELECTOR
    [all...]
MessagePattern.java 80 public final class MessagePattern implements Cloneable, Freezable<MessagePattern> {
141 * Constructs an empty MessagePattern with default ApostropheMode.
144 public MessagePattern() {
149 * Constructs an empty MessagePattern.
153 public MessagePattern(ApostropheMode mode) {
158 * Constructs a MessagePattern with default ApostropheMode and
167 public MessagePattern(String pattern) {
182 public MessagePattern parse(String pattern) {
199 public MessagePattern parseChoiceStyle(String pattern)
    [all...]
MessageFormat.java 37 import com.ibm.icu.text.MessagePattern.ArgType;
38 import com.ibm.icu.text.MessagePattern.Part;
135 * <li>See also {@link MessagePattern.ApostropheMode}
246 * For more details see {@link MessagePattern.ApostropheMode}.
452 msgPattern = new MessagePattern(pttrn);
476 * @see MessagePattern.ApostropheMode
479 public void applyPattern(String pattern, MessagePattern.ApostropheMode aposMode) {
481 msgPattern = new MessagePattern(aposMode);
493 public MessagePattern.ApostropheMode getApostropheMode() {
495 msgPattern = new MessagePattern(); // Sets the default mode
    [all...]
  /external/messageformat/java/com/ibm/icu/text/
SelectFormat.java 161 * The MessagePattern which contains the parsed structure of the pattern string.
163 transient private MessagePattern msgPattern;
195 msgPattern = new MessagePattern();
217 * @param pattern A MessagePattern.
222 public static int findSubMessage(MessagePattern pattern, int partIndex, String keyword) {
227 MessagePattern.Part part=pattern.getPart(partIndex++);
228 MessagePattern.Part.Type type=part.getType();
229 if(type==MessagePattern.Part.Type.ARG_LIMIT) {
232 assert type==MessagePattern.Part.Type.ARG_SELECTOR;
274 MessagePattern.Part part = msgPattern.getPart(++i)
    [all...]
MessagePattern.java 79 public final class MessagePattern implements Cloneable, Freezable<MessagePattern> {
140 * Constructs an empty MessagePattern with default ApostropheMode.
143 public MessagePattern() {
148 * Constructs an empty MessagePattern.
152 public MessagePattern(ApostropheMode mode) {
157 * Constructs a MessagePattern with default ApostropheMode and
166 public MessagePattern(String pattern) {
181 public MessagePattern parse(String pattern) {
198 public MessagePattern parseChoiceStyle(String pattern)
    [all...]
  /external/icu/icu4c/source/common/unicode/
messagepattern.h 6 * file name: messagepattern.h
20 * \brief C++ API: MessagePattern class: Parses and represents ICU MessageFormat patterns.
95 * MessagePattern::Part type constants.
273 * Return value from MessagePattern.validateArgumentName() for when
280 * Return value from MessagePattern.validateArgumentName() for when
292 * @see MessagePattern.getNumericValue()
322 * For every _START "part", MessagePattern.getLimitPartIndex() efficiently returns
358 class U_COMMON_API MessagePattern : public UObject {
361 * Constructs an empty MessagePattern with default UMessagePatternApostropheMode.
368 MessagePattern(UErrorCode &errorCode)
    [all...]
  /external/icu/icu4c/source/i18n/unicode/
choicfmt.h 37 #include "unicode/messagepattern.h"
333 * @deprecated ICU 4.8 Use the MessagePattern class to analyze a ChoiceFormat pattern.
343 * @deprecated ICU 4.8 Use the MessagePattern class to analyze a ChoiceFormat pattern.
353 * @deprecated ICU 4.8 Use the MessagePattern class to analyze a ChoiceFormat pattern.
502 * @param pattern A MessagePattern.
507 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,
527 * We need _some_ way to provide one for the MessagePattern constructor.
528 * Alternatively, the MessagePattern could be a pointer field, but that i
    [all...]
selfmt.h 19 #include "unicode/messagepattern.h"
350 * @param pattern A MessagePattern.
356 static int32_t findSubMessage(const MessagePattern& pattern, int32_t partIndex,
359 MessagePattern msgPattern;
  /external/messageformat/java/com/ibm/icu/simple/
PluralFormat.java 19 import com.ibm.icu.text.MessagePattern;
154 * The MessagePattern which contains the parsed structure of the pattern string.
156 transient private MessagePattern msgPattern;
159 * Obsolete with use of MessagePattern since ICU 4.8. Used to be:
255 msgPattern = new MessagePattern();
278 * @param pattern A MessagePattern.
287 MessagePattern pattern, int partIndex,
291 MessagePattern.Part part=pattern.getPart(partIndex);
322 MessagePattern.Part.Type type=part.getType();
323 if(type==MessagePattern.Part.Type.ARG_LIMIT)
    [all...]
MessageFormat.java 40 import com.ibm.icu.text.MessagePattern;
41 import com.ibm.icu.text.MessagePattern.ArgType;
42 import com.ibm.icu.text.MessagePattern.Part;
136 * <li>See also {@link MessagePattern.ApostropheMode}
248 * For more details see {@link MessagePattern.ApostropheMode}.
409 msgPattern = new MessagePattern(pttrn);
433 * @see MessagePattern.ApostropheMode
436 public void applyPattern(String pattern, MessagePattern.ApostropheMode aposMode) {
438 msgPattern = new MessagePattern(aposMode);
450 public MessagePattern.ApostropheMode getApostropheMode()
    [all...]
  /external/icu/icu4c/source/test/intltest/
tmsgfmt.h 123 UnicodeString GetPatternAndSkipSyntax(const MessagePattern& pattern);
  /external/icu/android_icu4j/src/main/tests/android/icu/dev/test/format/
MessagePatternUtilTest.java 18 import android.icu.text.MessagePattern;
30 * Test MessagePatternUtil (MessagePattern-as-tree-of-nodes API)
65 return expectComplexArg(name, MessagePattern.ArgType.CHOICE);
68 return expectComplexArg(name, MessagePattern.ArgType.PLURAL);
71 return expectComplexArg(name, MessagePattern.ArgType.SELECT);
74 return expectComplexArg(name, MessagePattern.ArgType.SELECTORDINAL);
76 private ExpectComplexArgNode expectComplexArg(Object name, MessagePattern.ArgType argType) {
150 argType = MessagePattern.ArgType.NONE;
152 argType = MessagePattern.ArgType.SIMPLE;
176 if (argType == MessagePattern.ArgType.NONE || argType == MessagePattern.ArgType.SIMPLE)
    [all...]
  /external/icu/icu4j/main/tests/core/src/com/ibm/icu/dev/test/format/
MessagePatternUtilTest.java 17 import com.ibm.icu.text.MessagePattern;
27 * Test MessagePatternUtil (MessagePattern-as-tree-of-nodes API)
61 return expectComplexArg(name, MessagePattern.ArgType.CHOICE);
64 return expectComplexArg(name, MessagePattern.ArgType.PLURAL);
67 return expectComplexArg(name, MessagePattern.ArgType.SELECT);
70 return expectComplexArg(name, MessagePattern.ArgType.SELECTORDINAL);
72 private ExpectComplexArgNode expectComplexArg(Object name, MessagePattern.ArgType argType) {
146 argType = MessagePattern.ArgType.NONE;
148 argType = MessagePattern.ArgType.SIMPLE;
172 if (argType == MessagePattern.ArgType.NONE || argType == MessagePattern.ArgType.SIMPLE)
    [all...]

Completed in 470 milliseconds

1 2