public interface TextSearchStrategy
setSubtext(String) before
indexOf(String) or indexOf will throw an
IllegalStateException.| Modifier and Type | Interface and Description |
|---|---|
static interface |
TextSearchStrategy.Factory
The factory for building implementations of
TextSearchStrategy
which is used as an identifier for the strategy itself. |
| Modifier and Type | Method and Description |
|---|---|
int |
indexOf(java.lang.String text)
Returns the index of the first occurrence of
subtext within
text; or -1 if subtext does not
occur within text. |
void |
setCharacterMap(char[] charMap)
Sets the strategy, if any, to map the characters being compared
during a text search.
|
void |
setSubtext(java.lang.String subtext)
Sets the subtext to locate when
indexOf(String) is called. |
void setCharacterMap(char[] charMap)
null normalizer indicates the raw
characters should be used during the text search.charMap - the strategy to use when normalizing characters
immediately before comparing them for equalityvoid setSubtext(java.lang.String subtext)
indexOf(String) is called.
Implementations should build any special data structures they may need
concerning the subtext in this method.subtext - the String to locate in indexOf(String)int indexOf(java.lang.String text)
subtext within
text; or -1 if subtext does not
occur within text. Implementations must throw an
IllegalStateException if setSubtext(String) has
not yet been called.text - String in which to locate subtextsubtext within
text; or -1java.lang.IllegalStateException - if no subtext has been setGlazed Lists, Copyright © 2003 publicobject.com, O'Dell Engineering.
Documentation build by swimmesberger at Mon Feb 25 11:02:37 CET 2019