public abstract class PatternMatcher<V> extends Object
Modifier and Type | Class and Description |
---|---|
static class |
PatternMatcher.Result<V> |
Modifier | Constructor and Description |
---|---|
protected |
PatternMatcher(V[] values) |
Modifier and Type | Method and Description |
---|---|
protected static boolean |
addMatchResult(int limit,
List results,
String pattern,
Object value,
int[] positions,
int len) |
protected abstract void |
fillMatchResults(char[] lookup,
int limit,
List results) |
static <V> PatternMatcher<V> |
forPatterns(Map<String,V> patternMap) |
PatternMatcher.Result<V> |
getMatch(String lookup)
Returns null if no match.
|
PatternMatcher.Result<V>[] |
getMatches(String lookup,
int limit)
Returns an empty array if no matches.
|
protected final V[] mValues
protected PatternMatcher(V[] values)
public static <V> PatternMatcher<V> forPatterns(Map<String,V> patternMap)
public PatternMatcher.Result<V> getMatch(String lookup)
public PatternMatcher.Result<V>[] getMatches(String lookup, int limit)
limit
- maximum number of results to returnprotected abstract void fillMatchResults(char[] lookup, int limit, List results)
Copyright © 2004-2015 Cojen. All Rights Reserved.