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()
Matchespublic MatchesIterator getMatches(java.lang.String field) throws java.io.IOException
MatchesMatchesIterator over the matches for a single field,
or null if there are no matches in that field.getMatches in interface Matchesjava.io.IOExceptionpublic java.util.Collection<Matches> getSubMatches()
MatchesgetSubMatches in interface Matchespublic 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)
Matchespublic static java.util.List<NamedMatches> findNamedMatches(Matches matches)
NamedMatches in a Matches tree