Package org.eclipse.jface.text
Interface MultiStringMatcher.Builder
-
- Enclosing class:
- MultiStringMatcher
public static interface MultiStringMatcher.Builder
A Builder for creating aMultiStringMatcher
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description MultiStringMatcher.Builder
add(String... searchStrings)
Adds search strings to be looked for.MultiStringMatcher
build()
Returns theMultiStringMatcher
built by this builder.
-
-
-
Method Detail
-
add
MultiStringMatcher.Builder add(String... searchStrings)
Adds search strings to be looked for.null
and empty strings in the arguments are ignored.- Parameters:
searchStrings
- to add to be looked for by the matcher.- Returns:
- this
- Throws:
IllegalStateException
- if theMultiStringMatcher
was already built.
-
build
MultiStringMatcher build()
Returns theMultiStringMatcher
built by this builder.Note that a
MultiStringMatcher.Builder
instance can build only oneMultiStringMatcher
instance. This is by design; otherwise the builder would have to store all the searchStrings somewhere, which may be rather memory intensive if a lot of search strings are added.- Returns:
- the
MultiStringMatcher
- Throws:
IllegalStateException
- if theMultiStringMatcher
was already built.
-
-