it.unimi.dsi.mg4j.query.nodes
Class Composite
java.lang.Object
it.unimi.dsi.mg4j.query.nodes.Composite
- All Implemented Interfaces:
- Query
- Direct Known Subclasses:
- And, Consecutive, MultiTerm, Or, OrderedAnd
public abstract class Composite
- extends Object
- implements Query
A abstract composite node containing an array of underlying queries.
- Author:
- Sebastiano Vigna
Field Summary |
protected Query[] |
query
The underlying queries. |
Method Summary |
protected String |
toString(String start,
String end,
String sep)
Returns a string representation of this node, given a start string, and end string and a separator. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface it.unimi.dsi.mg4j.query.nodes.Query |
accept |
query
protected final Query[] query
- The underlying queries.
Composite
public Composite(Query... query)
toString
protected String toString(String start,
String end,
String sep)
- Returns a string representation of this node, given a start string, and end string and a separator.
Instantiating subclasses can easily write their
Object.toString()
methods by supplying these three strings and calling this method.
- Parameters:
start
- the string to be used at the start of the string representation.end
- the string to be used at the end of the string representation.sep
- the separator between component queries.
- Returns:
- a string representation for this composite query node.