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

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

public class Weight
extends Object
implements Query

A node representing a weight selection.

Author:
Sebastiano Vigna
See Also:
Serialized Form

Field Summary
 Query query
          The only underlying node.
 double weight
          The weight selection.
 
Constructor Summary
Weight(double weight, Query query)
           
 
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

weight

public final double weight
The weight selection.


query

public final Query query
The only underlying node.

Constructor Detail

Weight

public Weight(double weight,
              Query query)
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