Package it.unimi.di.big.mg4j.query.nodes
Class Composite
- java.lang.Object
-
- it.unimi.di.big.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
-
-
Method Summary
Modifier and Type Method Description 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.
-
-
-
Field Detail
-
query
public final Query[] query
The component queries. Although public, this field should not be changed after creation.
-
-
Constructor Detail
-
Composite
public Composite(Query... query)
-
-
Method Detail
-
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 theirObject.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.
-
-