Lines Matching defs:keyword

86  * <p>The resulting keyword is provided to <code>MessageFormat</code>  as a
121 * for each user-defined keyword.
122 * The pattern is a sequence of (keyword, message) pairs.
123 * A keyword is a "pattern identifier": [^[[:Pattern_Syntax:][:Pattern_White_Space:]]]+
127 * <p>You always have to define a phrase for the default keyword
128 * <code>other</code>; this phrase is returned when the keyword
130 * the <code>format</code> method matches no other keyword.
211 * Finds the SelectFormat sub-message for the given keyword, or the "other" sub-message.
214 * @param keyword a keyword to be matched to one of the SelectFormat argument's keywords.
217 /*package*/ static int findSubMessage(MessagePattern pattern, int partIndex, String keyword) {
229 if(pattern.partSubstringMatches(part, keyword)) {
230 // keyword matches
241 * Selects the phrase for the given keyword.
243 * @param keyword a phrase selection keyword.
245 * @throws IllegalArgumentException when the given keyword is not a "pattern identifier"
247 public final String format(String keyword) {
248 //Check for the validity of the keyword
249 if (!PatternProps.isIdentifier(keyword)) {
258 int msgStart = findSubMessage(msgPattern, 0, keyword);
298 * Selects the phrase for the given keyword.
300 * @param keyword a phrase selection keyword.
304 * @throws IllegalArgumentException when the given keyword is not a String
309 public StringBuffer format(Object keyword, StringBuffer toAppendTo,
311 if (keyword instanceof String) {
312 toAppendTo.append(format( (String)keyword));
314 throw new IllegalArgumentException("'" + keyword + "' is not a String");