|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.jql.clause.SingleParentVisitor
public class SingleParentVisitor
A visitor which searches the clause tree for the given clause names.
If all the found clauses have the same parent, then the parent is returned
with getSingleParent()
, and the getFoundChildren()
will return
the found clauses.
If the found claues have different parents, then getSingleParent()
will return null
and the getFoundChildren()
will return an empty list.
If the clause tree has only one clause as its root, which is being searched for,
then getSingleParent()
will return null and the getFoundChildren()
will
return a list with the root.
Constructor Summary | |
---|---|
SingleParentVisitor(Set<String> clauseNames)
|
|
SingleParentVisitor(String... clauseNames)
|
Method Summary | |
---|---|
List<TerminalClause> |
getFoundChildren()
|
Clause |
getSingleParent()
|
Boolean |
visit(AndClause andClause)
Visit called when accepting a AndClause . |
Boolean |
visit(NotClause notClause)
Visit called when accepting a NotClause . |
Boolean |
visit(OrClause orClause)
Visit called when accepting a OrClause . |
Boolean |
visit(TerminalClause clause)
Visit called when accepting a TerminalClause . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SingleParentVisitor(String... clauseNames)
public SingleParentVisitor(Set<String> clauseNames)
Method Detail |
---|
public Clause getSingleParent()
public List<TerminalClause> getFoundChildren()
public Boolean visit(AndClause andClause)
ClauseVisitor
AndClause
.
visit
in interface ClauseVisitor<Boolean>
andClause
- the node being visited.
public Boolean visit(OrClause orClause)
ClauseVisitor
OrClause
.
visit
in interface ClauseVisitor<Boolean>
orClause
- the node being visited.
public Boolean visit(NotClause notClause)
ClauseVisitor
NotClause
.
visit
in interface ClauseVisitor<Boolean>
notClause
- the node being visited.
public Boolean visit(TerminalClause clause)
ClauseVisitor
TerminalClause
.
visit
in interface ClauseVisitor<Boolean>
clause
- the node being visited.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |