/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/regex/ |
H A D | ReplaceTest.java | 29 String target, pattern, repl; 32 pattern = "fo[^o]"; 35 Pattern p = Pattern.compile(pattern); 43 String target, pattern, repl, s; 48 pattern = "\\[([0-9]+)\\]([a-z]+)"; 51 p = Pattern.compile(pattern); 59 pattern = "\\[([0-9]+)\\]([a-z]+)\\(([0-9]+)\\)([a-z]+)\\{([0-9]+)\\}([a-z]+)"; 61 p = Pattern.compile(pattern); 76 String target, pattern, repl, s; 79 pattern [all...] |
H A D | MatcherTest.java | 104 String pattern = "a*b"; 105 Pattern pat = Pattern.compile(pattern); 139 String pattern = "dog"; 140 Pattern pat = Pattern.compile(pattern); 149 assertEquals(test, test.matcher("aaa").pattern()); 154 .pattern().toString()); 172 // of the specified pattern 282 assertTrue("Match expected, but failed: " + pat.pattern() 286 + pat.pattern() + " : " + stringSingles[i][j * 2 + 1], 294 assertTrue("Match expected, but failed: " + pat.pattern() [all...] |
/libcore/luni/src/test/java/org/apache/harmony/regex/tests/java/util/regex/ |
H A D | ReplaceTest.java | 26 String target, pattern, repl; 29 pattern = "fo[^o]"; 32 Pattern p = Pattern.compile(pattern); 40 String target, pattern, repl, s; 45 pattern = "\\[([0-9]+)\\]([a-z]+)"; 48 p = Pattern.compile(pattern); 56 pattern = "\\[([0-9]+)\\]([a-z]+)\\(([0-9]+)\\)([a-z]+)\\{([0-9]+)\\}([a-z]+)"; 58 p = Pattern.compile(pattern); 71 String target, pattern, repl, s; 74 pattern [all...] |
H A D | PatternTest.java | 80 // splitting CharSequence which ends with pattern 177 assertTrue(p.pattern().equals(aPattern)); 342 // contained in the pattern, but ICU doesn't do this. 385 * Check default flags when they are not specified in pattern. Based on RI 422 String pattern = "b)a"; 424 Pattern.compile(pattern); 425 fail("Expected a PatternSyntaxException when compiling pattern: " 426 + pattern); 430 pattern = "bcde)a"; 432 Pattern.compile(pattern); [all...] |
/libcore/ojluni/src/main/java/java/util/regex/ |
H A D | PatternSyntaxException.java | 33 * regular-expression pattern. 46 private final String pattern; field in class:PatternSyntaxException 56 * The erroneous pattern 59 * The approximate index in the pattern of the error, 64 this.pattern = regex; 71 * @return The approximate index in the pattern of the error, 88 * Retrieves the erroneous regular-expression pattern. 90 * @return The erroneous pattern 93 return pattern; 102 * error and its index, the erroneous regular-expression pattern, an [all...] |
H A D | Pattern.java | 46 * an instance of this class. The resulting pattern can then be used to create 50 * matcher, so many matchers can share the same pattern. 68 * is less efficient since it does not allow the compiled pattern to be reused. 536 * <tt>"\\u2014"</tt>, while not equal, compile into the same pattern, which 809 * Permits whitespace and comments in pattern. 833 * Enables literal parsing of the pattern. 836 * the pattern is treated as a sequence of literal characters. 908 /* Pattern has only two serialized components: The pattern string 909 * and the flags, which are all that is needed to recompile the pattern 917 * The original regular-expression pattern strin 921 private final String pattern; field in class:Pattern 980 public String pattern() { method in class:Pattern [all...] |
H A D | Matcher.java | 35 * <p> A matcher is created from a pattern by invoking the pattern's {@link 42 * input sequence against the pattern. </p></li> 45 * input sequence, starting at the beginning, against the pattern. </p></li> 48 * the next subsequence that matches the pattern. </p></li> 60 * methods. The way that the region boundaries interact with some pattern 76 * href="Pattern.html#cg">capturing group</a> in the pattern as well as a total 110 private Pattern pattern; field in class:Matcher 178 * Returns the pattern that is interpreted by this matcher. 180 * @return The pattern fo 182 public Pattern pattern() { method in class:Matcher [all...] |
/libcore/ojluni/src/main/java/java/util/logging/ |
H A D | FileHandler.java | 73 * <li> java.util.logging.FileHandler.pattern 74 * specifies a pattern for generating the output file name. See 82 * A pattern consists of a string that includes the following special 96 * Thus for example a pattern of "%t/java%g.log" with a count of 2 126 private String pattern; field in class:FileHandler 188 pattern = manager.getStringProperty(cname + ".pattern", "%h/java%u.log"); 221 * @exception NullPointerException if pattern property is an empty String. 233 * properties (or their default values) except that the given pattern 234 * argument is used as the filename pattern, th 246 FileHandler(String pattern) argument 278 FileHandler(String pattern, boolean append) argument 314 FileHandler(String pattern, int limit, int count) argument 353 FileHandler(String pattern, int limit, int count, boolean append) argument 464 generate(String pattern, int generation, int unique) argument [all...] |
/libcore/ojluni/src/main/java/java/sql/ |
H A D | Blob.java | 50 * determining the position of a pattern of bytes within a 115 * <code>pattern</code> begins within the <code>BLOB</code> 117 * search for <code>pattern</code> begins at position 120 * @param pattern the byte array for which to search 123 * @return the position at which the pattern appears, else -1 130 long position(byte pattern[], long start) throws SQLException; argument 135 * <code>pattern</code> begins. The search begins at position 138 * @param pattern the <code>Blob</code> object designating 142 * @return the position at which the pattern begins, else -1 149 long position(Blob pattern, lon argument [all...] |
/libcore/expectations/ |
H A D | brokentests.txt | 16 pattern: ".*java.lang.SecurityException\\s+at java.lang.System.setSecurityManager.*", 23 pattern: ".*\\.java:\\d+: cannot find symbol.*" 35 pattern: ".*java.net.UnknownHostException:.*jcltest.apache.org.*"
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/ |
H A D | SimpleDateFormatTest.java | 60 assertEquals("Wrong pattern", "yyyy", f2.toPattern()); 89 assertEquals("Wrong pattern", "y'y'yy", f2.toPattern()); 111 assertEquals("Wrong pattern", "'yyyy' MM yy", f2.toPattern()); 130 String pattern = "GyMdkHmsSEDFwWahKzZLc"; 131 f2.applyLocalizedPattern(pattern); 132 assertEquals(pattern, f2.toPattern()); 133 assertEquals(pattern, f2.toLocalizedPattern()); 160 assertEquals("Wrong pattern", "GyMdkHmsSEDFwWahKz", f2.toPattern()); 165 fail("Expected IllegalArgumentException for pattern with invalid patter letter: b"); 171 // fail("Expected IllegalArgumentException for pattern wit 394 assertFormat(SimpleDateFormat format, String pattern, Calendar cal, String expected, int field) argument 783 assertParse(String input, String pattern, Date expectedDate) argument 791 assertFormat(Date date, String pattern, String expectedOutput) argument 816 assertParse(String pattern, String input, Date expected, int start, int end) argument [all...] |
H A D | Support_MessageFormat.java | 50 String pattern = "On {4,date} at {3,time}, he ate {2,number, integer} hamburger{2,choice,1#|1<s} and drank {1, number} liters of coke. That was {0,choice,1#just enough|1<more than enough} food!"; 51 MessageFormat format = new MessageFormat(pattern, Locale.US); 79 String pattern = "On {4,date} at {3,time}, he ate {2,number, integer} hamburger{2,choice,1#|1<s} and drank {1, number} liters of coke. That was {0,choice,1#just enough|1<more than enough} food!"; 80 MessageFormat format = new MessageFormat(pattern, Locale.US);
|
H A D | MessageFormatTest.java | 97 String pattern = "getLocale test {0,number,#,####}"; 100 MessageFormat mf = new MessageFormat(pattern, l[i]); 107 MessageFormat mf = new MessageFormat(pattern); 137 assertEquals("Test1B:wrong format for pattern index " + i + ":", correctFormats[i], formats[i]); 190 String pattern = "A {3, number, currency} B {2, time} C {0, number, percent} D {4} E {1,choice,0#off|1#on} F {0, date}"; 191 MessageFormat mf = new MessageFormat(pattern); 262 String pattern = "Date: {0,date} Currency: {1, number, currency} Integer: {2, number, integer}"; 263 String sFormat = MessageFormat.format(pattern, (Object[]) args); 268 pattern = "abc {4, number, integer} def {3,date} ghi {2,number} jkl {1,choice,0#low|1#high} mnop {0}"; 271 sFormat = MessageFormat.format(pattern, args [all...] |
/libcore/luni/src/test/java/libcore/java/util/logging/ |
H A D | OldFormatterTest.java | 64 String pattern = "pattern without 0 {1, number}"; 65 r.setMessage(pattern); 66 assertEquals(pattern, f.formatMessage(r));
|
/libcore/ojluni/src/main/java/java/util/ |
H A D | Scanner.java | 45 * delimiter pattern, which by default matches whitespace. The resulting 104 * pattern, and then attempt to return the next token. Both <tt>hasNext</tt> 110 * methods operate independently of the delimiter pattern. These methods will 111 * attempt to match the specified pattern with no regard to delimiters in the 119 * <p>Depending upon the type of delimiting pattern, empty tokens may be 120 * returned. For example, the pattern <tt>"\\s+"</tt> will return no empty 122 * pattern <tt>"\\s"</tt> could return empty tokens since it only passes one 413 return p.pattern().equals(s); 420 // A pattern for java whitespace 424 // A pattern fo 578 Scanner(Readable source, Pattern pattern) argument 913 getCompleteTokenInBuffer(Pattern pattern) argument 1011 findPatternInBuffer(Pattern pattern, int horizon) argument 1057 matchPatternInBuffer(Pattern pattern) argument 1142 useDelimiter(Pattern pattern) argument 1161 useDelimiter(String pattern) argument 1416 hasNext(String pattern) argument 1434 next(String pattern) argument 1449 hasNext(Pattern pattern) argument 1481 next(Pattern pattern) argument 1582 findInLine(String pattern) argument 1604 findInLine(Pattern pattern) argument 1650 findWithinHorizon(String pattern, int horizon) argument 1684 findWithinHorizon(Pattern pattern, int horizon) argument 1730 skip(Pattern pattern) argument 1763 skip(String pattern) argument [all...] |
/libcore/ojluni/src/main/java/java/text/ |
H A D | MessageFormat.java | 60 * inserts the formatted strings into the pattern at the appropriate places. 69 * behavior is defined by the pattern that you provide as well as the 101 * pattern string <code>"'{0}'"</code> represents string 104 * <i>String</i>. For example, pattern string <code>"'{''}'"</code> is 113 * subformat, and subformat-dependent pattern rules apply. For example, 114 * pattern string <code>"{1,number,<u>$'#',##</u>}"</code> 121 * pattern. For example, pattern string {@code "'{0}"} is treated as 122 * pattern {@code "'{0}'"}. 124 * <p>Any curly braces within an unquoted pattern mus 362 MessageFormat(String pattern) argument 380 MessageFormat(String pattern, Locale locale) argument 426 applyPattern(String pattern) argument 838 format(String pattern, Object ... arguments) argument 1183 private String pattern = ""; field in class:MessageFormat [all...] |
H A D | MergeCollation.java | 47 * <pattern> := <entry>* 66 * Creates from a pattern 67 * @exception ParseException If the input pattern is incorrect. 69 public MergeCollation(String pattern) throws ParseException argument 73 setPattern(pattern); 77 * recovers current pattern 84 * recovers current pattern. 133 * emits the pattern for collation builder. 142 * emits the pattern for collation builder. 161 * sets the pattern 163 setPattern(String pattern) argument 173 addPattern(String pattern) argument [all...] |
H A D | SimpleDateFormat.java | 73 * with a default format pattern. You may modify the format pattern 80 * Date and time formats are specified by <em>date and time pattern</em> 82 * Within date and time pattern strings, unquoted letters from 84 * <code>'z'</code> are interpreted as pattern letters representing the 93 * The following pattern letters are defined (all other characters from 97 * <table border=0 cellspacing=3 cellpadding=0 summary="Chart shows pattern letters, date/time component, presentation, and examples."> 219 * For formatting, if the number of pattern letters is 4 or more, 223 * of pattern letters.<br><br></li> 225 * For formatting, the number of pattern letter 441 private String pattern; field in class:SimpleDateFormat 552 SimpleDateFormat(String pattern) argument 569 SimpleDateFormat(String pattern, Locale locale) argument 591 SimpleDateFormat(String pattern, DateFormatSymbols formatSymbols) argument 731 compile(String pattern) argument 2256 translatePattern(String pattern, String from, String to) argument 2318 applyPattern(String pattern) argument 2332 applyLocalizedPattern(String pattern) argument [all...] |
/libcore/ojluni/src/main/java/javax/net/ssl/ |
H A D | SNIHostName.java | 294 * regular expression pattern</a> 327 private final Pattern pattern; field in class:SNIHostName.SNIHostNameMatcher 334 * regular expression pattern</a> 343 pattern = Pattern.compile(regex, Pattern.CASE_INSENSITIVE); 387 if (pattern.matcher(asciiName).matches()) { 393 return pattern.matcher(IDN.toUnicode(asciiName)).matches();
|
/libcore/benchmarks/src/benchmarks/regression/ |
H A D | SchemePrefixBenchmark.java | 57 private final Pattern pattern = Pattern.compile("^([a-zA-Z][a-zA-Z0-9+\\-.]*):"); 60 Matcher matcher = pattern.matcher(spec);
|
/libcore/luni/src/main/java/libcore/icu/ |
H A D | ICU.java | 293 String pattern = CACHED_PATTERNS.get(key); 294 if (pattern == null) { 295 pattern = getBestDateTimePatternNative(skeleton, languageTag); 296 CACHED_PATTERNS.put(key, pattern); 298 return pattern; 304 public static char[] getDateFormatOrder(String pattern) { argument 311 for (int i = 0; i < pattern.length(); ++i) { 312 char ch = pattern.charAt(i); 327 throw new IllegalArgumentException("Bad pattern character '" + ch + "' in " + pattern); [all...] |
/libcore/ojluni/src/main/java/sun/security/util/ |
H A D | Debug.java | 199 Pattern pattern = Pattern.compile(reg); 200 Matcher matcher = pattern.matcher(source); 223 pattern = Pattern.compile(reg); 224 matcher = pattern.matcher(source);
|
/libcore/support/src/test/java/tests/support/ |
H A D | Support_MessageFormat.java | 47 String pattern = "On {4,date} at {3,time}, he ate {2,number, integer} hamburger{2,choice,1#|1<s} and drank {1, number} litres of coke. That was {0,choice,1#just enough|1<more than enough} food!"; 48 MessageFormat format = new MessageFormat(pattern, Locale.US); 74 String pattern = "On {4,date} at {3,time}, he ate {2,number, integer} hamburger{2,choice,1#|1<s} and drank {1, number} litres of coke. That was {0,choice,1#just enough|1<more than enough} food!"; 75 MessageFormat format = new MessageFormat(pattern, Locale.US);
|
/libcore/luni/src/main/native/ |
H A D | java_util_regex_Pattern.cpp | 37 case U_REGEX_RULE_SYNTAX: return "Syntax error in regexp pattern"; 39 case U_REGEX_BAD_ESCAPE_SEQUENCE: return "Unrecognized backslash escape sequence in pattern"; 42 case U_REGEX_MISMATCHED_PAREN: return "Incorrectly nested parentheses in regexp pattern"; 48 case U_REGEX_LOOK_BEHIND_LIMIT: return "Look-behind pattern matches must have a bounded maximum length"; 61 static void throwPatternSyntaxException(JNIEnv* env, UErrorCode status, jstring pattern, UParseError error) { argument 66 jobject exception = env->NewObject(exceptionClass, method, message, pattern, error.offset);
|
/libcore/luni/src/test/java/libcore/java/lang/ |
H A D | OldStringTest.java | 221 assertTrue("Returned incorrect string array for pattern: " + 235 String pattern = "[!.1]"; 241 Arrays.equals(results[0], str.split(pattern, 4))); 243 Arrays.equals(results[1], str.split(pattern, 9))); 245 Arrays.equals(results[1], str.split(pattern, 0))); 247 Arrays.equals(results[1], str.split(pattern, -1))); 249 Arrays.equals(results[1], str.split(pattern, 10))); 251 Arrays.equals(results[1], str.split(pattern, Integer.MAX_VALUE)));
|