it.unimi.di.mg4j.query.nodes
Class Consecutive

java.lang.Object
  extended by it.unimi.di.mg4j.query.nodes.Composite
      extended by it.unimi.di.mg4j.query.nodes.Consecutive
All Implemented Interfaces:
Query, Serializable

public class Consecutive
extends Composite

A node representing the consecutive composition of the underlying queries.

Author:
Sebastiano Vigna
See Also:
Serialized Form

Field Summary
 int[] gap
          The gap array for this consecutive composition, or null for no gaps (see ConsecutiveDocumentIterator).
 
Fields inherited from class it.unimi.di.mg4j.query.nodes.Composite
query
 
Constructor Summary
Consecutive(Query... query)
           
Consecutive(Query[] query, int[] gap)
           
 
Method Summary
<T> T
accept(QueryBuilderVisitor<T> visitor)
          Accepts a visitor.
 boolean equals(Object o)
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class it.unimi.di.mg4j.query.nodes.Composite
components, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

gap

public final int[] gap
The gap array for this consecutive composition, or null for no gaps (see ConsecutiveDocumentIterator). The array can be long as Composite.query, or have an additional element representing a final gap: in this case, the index against which the query is resolved must provide document sizes.

Constructor Detail

Consecutive

public Consecutive(Query... query)

Consecutive

public Consecutive(Query[] query,
                   int[] gap)
Method Detail

toString

public String toString()
Overrides:
toString in class Object

accept

public <T> T accept(QueryBuilderVisitor<T> visitor)
         throws QueryBuilderVisitorException
Description copied from interface: Query
Accepts a visitor.

Parameters:
visitor - the visitor.
Returns:
the result of the visit, or null if the visit should stop.
Throws:
QueryBuilderVisitorException
See Also:
Query

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object