it.unimi.di.mg4j.query.nodes
Class Term
java.lang.Object
it.unimi.di.mg4j.query.nodes.Term
- All Implemented Interfaces:
- Query, Serializable
public class Term
- extends Object
- implements Query
A node representing a single term.
- Author:
- Sebastiano Vigna
- See Also:
- Serialized Form
Field Summary |
CharSequence |
term
The term represented by this node, or null if the term is defined by its number. |
int |
termNumber
The number of the term represented by this node, or -1 if the term is defined literally. |
term
public final CharSequence term
- The term represented by this node, or
null
if the term is defined by its number.
termNumber
public final int termNumber
- The number of the term represented by this node, or -1 if the term is defined literally.
Term
public Term(CharSequence term)
Term
public Term(int termNumber)
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