it.unimi.di.mg4j.query.nodes
Class Composite
java.lang.Object
it.unimi.di.mg4j.query.nodes.Composite
- All Implemented Interfaces:
- Query, Serializable
- Direct Known Subclasses:
- And, Consecutive, MultiTerm, Or, OrderedAnd
public abstract class Composite
- extends Object
- implements Query
A abstract composite node containing an array of component queries.
- Author:
- Sebastiano Vigna
- See Also:
- Serialized Form
Field Summary |
Query[] |
query
The component queries. |
Method Summary |
Query[] |
components()
Returns a copy of the vector of the component queries (the queries themselves are not copied). |
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.di.mg4j.query.nodes.Query |
accept |
query
public final Query[] query
- The component queries. Although public, this field should not be changed after creation.
Composite
public Composite(Query... query)
components
public Query[] components()
- Returns a copy of the vector of the component queries (the queries themselves are not copied).
- Returns:
- a copy of the vector of the component queries.
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.