public class NamedMatches extends java.lang.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)
Modifier and Type | Class and Description |
---|---|
private static class |
NamedMatches.NamedQuery |
Modifier and Type | Field and Description |
---|---|
private Matches |
in |
private java.lang.String |
name |
Constructor and Description |
---|
NamedMatches(java.lang.String name,
Matches in)
Wraps a
Matches object and associates a name with it |
Modifier and Type | Method and Description |
---|---|
static java.util.List<NamedMatches> |
findNamedMatches(Matches matches)
Finds all
NamedMatches in a Matches tree |
MatchesIterator |
getMatches(java.lang.String field)
Returns a
MatchesIterator over the matches for a single field,
or null if there are no matches in that field. |
java.lang.String |
getName()
Returns the name of this
Matches |
java.util.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
|
java.util.Iterator<java.lang.String> |
iterator() |
static Query |
wrapQuery(java.lang.String name,
Query in)
Wrap a Query so that it associates a name with its
Matches |
private final Matches in
private final java.lang.String name
public java.lang.String getName()
Matches
public MatchesIterator getMatches(java.lang.String field) throws java.io.IOException
Matches
MatchesIterator
over the matches for a single field,
or null
if there are no matches in that field.getMatches
in interface Matches
java.io.IOException
public java.util.Collection<Matches> getSubMatches()
Matches
getSubMatches
in interface Matches
public java.util.Iterator<java.lang.String> iterator()
iterator
in interface java.lang.Iterable<java.lang.String>
public static Query wrapQuery(java.lang.String name, Query in)
Matches
public static java.util.List<NamedMatches> findNamedMatches(Matches matches)
NamedMatches
in a Matches
tree