com.atlassian.jira.jql.clause
Class DeMorgansVisitor

java.lang.Object
  extended by com.atlassian.jira.jql.clause.DeMorgansVisitor
All Implemented Interfaces:
ClauseVisitor<Clause>

public class DeMorgansVisitor
extends Object
implements ClauseVisitor<Clause>

Expands the not clauses in a clause tree using DeMorgans law and flips the operators to remove the not alltogether when possible.

Since:
v4.0

Constructor Summary
DeMorgansVisitor()
           
 
Method Summary
 Clause visit(AndClause andClause)
          Visit called when accepting a AndClause.
 Clause visit(NotClause notClause)
          Visit called when accepting a NotClause.
 Clause visit(OrClause orClause)
          Visit called when accepting a OrClause.
 Clause visit(TerminalClause terminalClause)
          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

DeMorgansVisitor

public DeMorgansVisitor()
Method Detail

visit

public Clause visit(NotClause notClause)
Description copied from interface: ClauseVisitor
Visit called when accepting a NotClause.

Specified by:
visit in interface ClauseVisitor<Clause>
Parameters:
notClause - the node being visited.
Returns:
The return type specified by the visitor.

visit

public Clause visit(AndClause andClause)
Description copied from interface: ClauseVisitor
Visit called when accepting a AndClause.

Specified by:
visit in interface ClauseVisitor<Clause>
Parameters:
andClause - the node being visited.
Returns:
The return type specified by the visitor.

visit

public Clause visit(OrClause orClause)
Description copied from interface: ClauseVisitor
Visit called when accepting a OrClause.

Specified by:
visit in interface ClauseVisitor<Clause>
Parameters:
orClause - the node being visited.
Returns:
The return type specified by the visitor.

visit

public Clause visit(TerminalClause terminalClause)
Description copied from interface: ClauseVisitor
Visit called when accepting a TerminalClause.

Specified by:
visit in interface ClauseVisitor<Clause>
Parameters:
terminalClause - the node being visited.
Returns:
The return type specified by the visitor.


Copyright © 2002-2010 Atlassian. All Rights Reserved.