Class SearchCompiler.CoreSimpleMatchFactory
- java.lang.Object
-
- org.openstreetmap.josm.data.osm.search.SearchCompiler.CoreSimpleMatchFactory
-
- All Implemented Interfaces:
SearchCompiler.MatchFactory,SearchCompiler.SimpleMatchFactory
- Enclosing class:
- SearchCompiler
public static class SearchCompiler.CoreSimpleMatchFactory extends java.lang.Object implements SearchCompiler.SimpleMatchFactory
The core factory for "simple"SearchCompiler.Matchobjects
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Collection<java.lang.String>keywords
-
Constructor Summary
Constructors Constructor Description CoreSimpleMatchFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SearchCompiler.Matchget(java.lang.String keyword, boolean caseSensitive, boolean regexSearch, PushbackTokenizer tokenizer)Get theSearchCompiler.Matchobjectjava.util.Collection<java.lang.String>getKeywords()private static SearchCompiler.MatchgetTokenizer(java.lang.String keyword, boolean caseSensitive, boolean regexSearch, PushbackTokenizer tokenizer)
-
-
-
Field Detail
-
keywords
private final java.util.Collection<java.lang.String> keywords
-
-
Constructor Detail
-
CoreSimpleMatchFactory
public CoreSimpleMatchFactory()
-
-
Method Detail
-
get
public SearchCompiler.Match get(java.lang.String keyword, boolean caseSensitive, boolean regexSearch, PushbackTokenizer tokenizer) throws SearchParseError
Description copied from interface:SearchCompiler.SimpleMatchFactoryGet theSearchCompiler.Matchobject- Specified by:
getin interfaceSearchCompiler.SimpleMatchFactory- Parameters:
keyword- The keyword to get/create the correctSearchCompiler.MatchobjectcaseSensitive-trueif the search is case-sensitiveregexSearch-trueif the search is regex-basedtokenizer- May be used to construct theSearchCompiler.Matchobject- Returns:
- The
SearchCompiler.Matchobject for the keyword and its arguments - Throws:
SearchParseError- If theSearchCompiler.Matchobject could not be constructed.
-
getTokenizer
private static SearchCompiler.Match getTokenizer(java.lang.String keyword, boolean caseSensitive, boolean regexSearch, PushbackTokenizer tokenizer) throws SearchParseError
- Throws:
SearchParseError
-
getKeywords
public java.util.Collection<java.lang.String> getKeywords()
- Specified by:
getKeywordsin interfaceSearchCompiler.MatchFactory
-
-