public class NamedMatches extends Object implements Matches
wrapQuery(String, Query)
, and
the matching queries for a particular document can then be pulled from the parent
Query's Matches
object by calling findNamedMatches(Matches)
Constructor and Description |
---|
NamedMatches(String name,
Matches in)
Wraps a
Matches object and associates a name with it |
Modifier and Type | Method and Description |
---|---|
static List<NamedMatches> |
findNamedMatches(Matches matches)
Finds all
NamedMatches in a Matches tree |
MatchesIterator |
getMatches(String field)
Returns a
MatchesIterator over the matches for a single field,
or null if there are no matches in that field. |
String |
getName()
Returns the name of this
Matches |
Collection<Matches> |
getSubMatches()
Returns a collection of Matches that make up this instance; if it is not
a composite, then this returns an empty list
|
Iterator<String> |
iterator() |
static Query |
wrapQuery(String name,
Query in)
Wrap a Query so that it associates a name with its
Matches |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public MatchesIterator getMatches(String field) throws IOException
Matches
MatchesIterator
over the matches for a single field,
or null
if there are no matches in that field.getMatches
in interface Matches
IOException
public Collection<Matches> getSubMatches()
Matches
getSubMatches
in interface Matches
public static Query wrapQuery(String name, Query in)
Matches
public static List<NamedMatches> findNamedMatches(Matches matches)
NamedMatches
in a Matches
treeCopyright © 2000-2021 Apache Software Foundation. All Rights Reserved.