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

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

public class Difference
extends Object
implements Query

A node representing a difference of two queries.

Author:
Sebastiano Vigna
See Also:
Serialized Form

Field Summary
 int leftMargin
          A margin that will be added to the left of each interval.
 Query minuend
          The minuend query.
 int rightMargin
          A margin that will be added to the right of each interval.
 Query subtrahend
          The subtrahend query.
 
Constructor Summary
Difference(Query minuend, Query subtrahend)
           
Difference(Query minuend, Query subtrahend, int leftMargin, int rightMargin)
           
 
Method Summary
<T> T
accept(QueryBuilderVisitor<T> visitor)
          Accepts a visitor.
 boolean equals(Object o)
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

minuend

public final Query minuend
The minuend query.


subtrahend

public final Query subtrahend
The subtrahend query.


leftMargin

public final int leftMargin
A margin that will be added to the left of each interval.


rightMargin

public final int rightMargin
A margin that will be added to the right of each interval.

Constructor Detail

Difference

public Difference(Query minuend,
                  Query subtrahend)

Difference

public Difference(Query minuend,
                  Query subtrahend,
                  int leftMargin,
                  int rightMargin)
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.

Specified by:
accept in interface Query
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