|
TV-Browser 3.3.3 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object tvbrowser.core.search.AbstractSearcher tvbrowser.core.search.regexsearch.RegexSearcher
public class RegexSearcher
Searches for programs using a regular expression.
Field Summary |
---|
Fields inherited from class tvbrowser.core.search.AbstractSearcher |
---|
mReplaceSpCh |
Constructor Summary | |
---|---|
RegexSearcher(java.util.regex.Pattern pattern)
Creates a new instance of RegexSearcher. |
|
RegexSearcher(java.lang.String regex,
boolean caseSensitive)
Creates a new instance of RegexSearcher. |
|
RegexSearcher(java.lang.String regex,
boolean caseSensitive,
java.lang.String searchTerm)
Creates a new instance of RegexSearcher. |
Method Summary | |
---|---|
static java.util.regex.Pattern |
createSearchPattern(java.lang.String regex,
boolean caseSensitive)
Creates a pattern for a regular expression. |
java.util.regex.Pattern |
getPattern()
get the pattern used by this searcher |
protected boolean |
matches(java.lang.String value)
Checks whether a value matches to the criteria of this searcher. |
static java.lang.String |
searchTextToRegex(java.lang.String searchText,
boolean matchKeyword)
Creates a regex from a search text. |
Methods inherited from class tvbrowser.core.search.AbstractSearcher |
---|
matches, search, search, search |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RegexSearcher(java.util.regex.Pattern pattern)
pattern
- The regex pattern to use.public RegexSearcher(java.lang.String regex, boolean caseSensitive) throws TvBrowserException
regex
- caseSensitive
-
TvBrowserException
- If there is a syntax error in the regular expression.public RegexSearcher(java.lang.String regex, boolean caseSensitive, java.lang.String searchTerm) throws TvBrowserException
regex
- caseSensitive
-
TvBrowserException
- If there is a syntax error in the regular expression.Method Detail |
---|
public static java.util.regex.Pattern createSearchPattern(java.lang.String regex, boolean caseSensitive) throws TvBrowserException
regex
- The regular expressioncaseSensitive
- Should the search be case sensitive?
TvBrowserException
- If there is a syntax error in the regular expression.public static java.lang.String searchTextToRegex(java.lang.String searchText, boolean matchKeyword)
All regex code in the search text will be quoted. The returned regex will ignore differences in whitespace.
searchText
- The search text to create a regex for.matchKeyword
- Specifies whether the regex should match a keyword
(= substring). If false the returned regex will only match if the
checked String matches exactly
protected boolean matches(java.lang.String value)
matches
in class AbstractSearcher
value
- The value to check
public java.util.regex.Pattern getPattern()
|
TV-Browser 3.3.3 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |