|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.unimi.dsi.mg4j.query.nodes.AbstractTermExpander.ExpanderVisitor
protected class AbstractTermExpander.ExpanderVisitor
Constructor Summary | |
---|---|
protected |
AbstractTermExpander.ExpanderVisitor()
|
Method Summary | |
---|---|
QueryBuilderVisitor<Query> |
copy()
|
Query[] |
newArray(int len)
Builds an array of given length of type T . |
QueryBuilderVisitor<Query> |
prepare()
Prepares the internal state of this visitor for a(nother) visit. |
Query |
visit(Prefix node)
Visits a Prefix . |
Query |
visit(Range node)
Visits a Range . |
Query |
visit(Term node)
Visits a Term . |
Query |
visitPost(Align node,
Query[] subNode)
Visits an Align node after recursing into the corresponding subtree. |
Query |
visitPost(And node,
Query[] subNode)
Visits an And node after recursing into the corresponding subtree. |
Query |
visitPost(Consecutive node,
Query[] subNode)
Visits a Consecutive node after recursing into the corresponding subtree. |
Query |
visitPost(Difference node,
Query[] subNode)
Visits an Difference node after recursing into the corresponding subtree. |
Query |
visitPost(LowPass node,
Query subNode)
Visits a LowPass node after recursing into the corresponding subtree. |
Query |
visitPost(MultiTerm node,
Query[] subNode)
Visits a MultiTerm node after recursing into the corresponding subtree. |
Query |
visitPost(Not node,
Query subNode)
Visits a Not node after recursing into the corresponding subtree. |
Query |
visitPost(OrderedAnd node,
Query[] subNode)
Visits an OrderedAnd node after recursing into the corresponding subtree. |
Query |
visitPost(Or node,
Query[] subNode)
Visits an Or node after recursing into the corresponding subtree. |
Query |
visitPost(Select node,
Query subNode)
Visits a Select node after recursing into the corresponding subtree. |
boolean |
visitPre(Align node)
Visits an Align node before recursing into the corresponding subtree. |
boolean |
visitPre(And node)
Visits an And node before recursing into the corresponding subtree. |
boolean |
visitPre(Consecutive node)
Visits a Consecutive node before recursing into the corresponding subtree. |
boolean |
visitPre(Difference node)
Visits an Difference node before recursing into the corresponding subtree. |
boolean |
visitPre(LowPass node)
Visits a LowPass node before recursing into the corresponding subtree. |
boolean |
visitPre(MultiTerm node)
Visits a MultiTerm node before recursing into the corresponding subtree. |
boolean |
visitPre(Not node)
Visits a Not node before recursing into the corresponding subtree. |
boolean |
visitPre(Or node)
Visits an Or node before recursing into the corresponding subtree. |
boolean |
visitPre(OrderedAnd node)
Visits an OrderedAnd node before recursing into the corresponding subtree. |
boolean |
visitPre(Select node)
Visits a Select node before recursing into the corresponding subtree. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected AbstractTermExpander.ExpanderVisitor()
Method Detail |
---|
public QueryBuilderVisitor<Query> copy()
copy
in interface FlyweightPrototype<QueryBuilderVisitor<Query>>
copy
in interface QueryBuilderVisitor<Query>
public Query[] newArray(int len)
QueryBuilderVisitor
T
.
Because of erasure, generic classes in Java cannot allocate arrays
of generic types. This impossibility can be a problem if for some reason
the visitPost()
methods expect an actual array of
type T
. This method must provide an array of given length
that is an acceptable input for all visitPost()
methods.
Note that by declaring an implementing class of this interface
that has a sole constructor accepting an argument of type Class<T>
,
you will force the user to provide the class of the generic type, opening
the way for the reflective methods in Array
.
newArray
in interface QueryBuilderVisitor<Query>
len
- the required array length.
T
of length len
.public QueryBuilderVisitor<Query> prepare()
QueryBuilderVisitor
By specification, it must be safe to call this method any number of times.
prepare
in interface QueryBuilderVisitor<Query>
public Query visit(Term node) throws QueryBuilderVisitorException
QueryBuilderVisitor
Term
.
visit
in interface QueryBuilderVisitor<Query>
node
- the leaf to be visited.
QueryBuilderVisitorException
public Query visit(Prefix node) throws QueryBuilderVisitorException
QueryBuilderVisitor
Prefix
.
visit
in interface QueryBuilderVisitor<Query>
node
- the leaf to be visited.
subNode
) if the visit should continue, or null
.
QueryBuilderVisitorException
public Query visit(Range node) throws QueryBuilderVisitorException
QueryBuilderVisitor
Range
.
visit
in interface QueryBuilderVisitor<Query>
node
- the leaf to be visited.
QueryBuilderVisitorException
public Query visitPost(And node, Query[] subNode) throws QueryBuilderVisitorException
QueryBuilderVisitor
And
node after recursing into the corresponding subtree.
visitPost
in interface QueryBuilderVisitor<Query>
node
- the internal node to be visited.subNode
- the array of results returned by subnodes.
subNode
) if the visit should continue, or null
.
QueryBuilderVisitorException
public Query visitPost(Consecutive node, Query[] subNode) throws QueryBuilderVisitorException
QueryBuilderVisitor
Consecutive
node after recursing into the corresponding subtree.
visitPost
in interface QueryBuilderVisitor<Query>
node
- the internal node to be visited.subNode
- the array of results returned by subnodes.
subNode
) if the visit should continue, or null
.
QueryBuilderVisitorException
public Query visitPost(LowPass node, Query subNode) throws QueryBuilderVisitorException
QueryBuilderVisitor
LowPass
node after recursing into the corresponding subtree.
visitPost
in interface QueryBuilderVisitor<Query>
node
- the internal node to be visited.subNode
- the of result returned by the sole subnode.
subNode
) if the visit should continue, or null
.
QueryBuilderVisitorException
public Query visitPost(Not node, Query subNode) throws QueryBuilderVisitorException
QueryBuilderVisitor
Not
node after recursing into the corresponding subtree.
visitPost
in interface QueryBuilderVisitor<Query>
node
- the internal node to be visited.subNode
- the of result returned by the sole subnode.
subNode
) if the visit should continue, or null
.
QueryBuilderVisitorException
public Query visitPost(Or node, Query[] subNode) throws QueryBuilderVisitorException
QueryBuilderVisitor
Or
node after recursing into the corresponding subtree.
visitPost
in interface QueryBuilderVisitor<Query>
node
- the internal node to be visited.
subNode
) if the visit should continue, or null
.
QueryBuilderVisitorException
public Query visitPost(OrderedAnd node, Query[] subNode) throws QueryBuilderVisitorException
QueryBuilderVisitor
OrderedAnd
node after recursing into the corresponding subtree.
visitPost
in interface QueryBuilderVisitor<Query>
node
- the internal node to be visited.subNode
- the array of results returned by subnodes.
subNode
) if the visit should continue, or null
.
QueryBuilderVisitorException
public Query visitPost(Align node, Query[] subNode) throws QueryBuilderVisitorException
QueryBuilderVisitor
Align
node after recursing into the corresponding subtree.
visitPost
in interface QueryBuilderVisitor<Query>
node
- the internal node to be visited.subNode
- the array of results returned by subnodes.
subNode
) if the visit should continue, or null
.
QueryBuilderVisitorException
public Query visitPost(Difference node, Query[] subNode) throws QueryBuilderVisitorException
QueryBuilderVisitor
Difference
node after recursing into the corresponding subtree.
visitPost
in interface QueryBuilderVisitor<Query>
node
- the internal node to be visited.subNode
- the array of results returned by subnodes.
subNode
) if the visit should continue, or null
.
QueryBuilderVisitorException
public Query visitPost(MultiTerm node, Query[] subNode) throws QueryBuilderVisitorException
QueryBuilderVisitor
MultiTerm
node after recursing into the corresponding subtree.
visitPost
in interface QueryBuilderVisitor<Query>
node
- the internal node to be visited.subNode
- the of result returned by the sole subnode.
subNode
) if the visit should continue, or null
.
QueryBuilderVisitorException
public Query visitPost(Select node, Query subNode) throws QueryBuilderVisitorException
QueryBuilderVisitor
Select
node after recursing into the corresponding subtree.
visitPost
in interface QueryBuilderVisitor<Query>
node
- the internal node to be visited.subNode
- the of result returned by the sole subnode.
subNode
) if the visit should continue, or null
.
QueryBuilderVisitorException
public boolean visitPre(And node) throws QueryBuilderVisitorException
QueryBuilderVisitor
And
node before recursing into the corresponding subtree.
visitPre
in interface QueryBuilderVisitor<Query>
node
- the node to be visited.
QueryBuilderVisitorException
public boolean visitPre(Consecutive node) throws QueryBuilderVisitorException
QueryBuilderVisitor
Consecutive
node before recursing into the corresponding subtree.
visitPre
in interface QueryBuilderVisitor<Query>
node
- the node to be visited.
QueryBuilderVisitorException
public boolean visitPre(LowPass node) throws QueryBuilderVisitorException
QueryBuilderVisitor
LowPass
node before recursing into the corresponding subtree.
visitPre
in interface QueryBuilderVisitor<Query>
node
- the node to be visited.
QueryBuilderVisitorException
public boolean visitPre(Not node) throws QueryBuilderVisitorException
QueryBuilderVisitor
Not
node before recursing into the corresponding subtree.
visitPre
in interface QueryBuilderVisitor<Query>
node
- the node to be visited.
QueryBuilderVisitorException
public boolean visitPre(Or node) throws QueryBuilderVisitorException
QueryBuilderVisitor
Or
node before recursing into the corresponding subtree.
visitPre
in interface QueryBuilderVisitor<Query>
node
- the node to be visited.
QueryBuilderVisitorException
public boolean visitPre(OrderedAnd node) throws QueryBuilderVisitorException
QueryBuilderVisitor
OrderedAnd
node before recursing into the corresponding subtree.
visitPre
in interface QueryBuilderVisitor<Query>
node
- the node to be visited.
QueryBuilderVisitorException
public boolean visitPre(Align node) throws QueryBuilderVisitorException
QueryBuilderVisitor
Align
node before recursing into the corresponding subtree.
visitPre
in interface QueryBuilderVisitor<Query>
node
- the node to be visited.
QueryBuilderVisitorException
public boolean visitPre(Difference node) throws QueryBuilderVisitorException
QueryBuilderVisitor
Difference
node before recursing into the corresponding subtree.
visitPre
in interface QueryBuilderVisitor<Query>
node
- the node to be visited.
QueryBuilderVisitorException
public boolean visitPre(MultiTerm node) throws QueryBuilderVisitorException
QueryBuilderVisitor
MultiTerm
node before recursing into the corresponding subtree.
visitPre
in interface QueryBuilderVisitor<Query>
node
- the node to be visited.
QueryBuilderVisitorException
public boolean visitPre(Select node) throws QueryBuilderVisitorException
QueryBuilderVisitor
Select
node before recursing into the corresponding subtree.
visitPre
in interface QueryBuilderVisitor<Query>
node
- the node to be visited.
QueryBuilderVisitorException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |