com.atlassian.query.clause
Interface Clause

All Known Subinterfaces:
ChangedClause, TerminalClause, WasClause
All Known Implementing Classes:
AndClause, ChangedClauseImpl, MultiClause, NotClause, OrClause, TerminalClauseImpl, WasClauseImpl

@PublicApi
public interface Clause

Represents a node in the tree that gets generated for a Query. The tree of these will be used to generate an overall search.


Method Summary
<R> R
accept(ClauseVisitor<R> visitor)
          Allows us to perform operations over the clauses based on the passed in visitor.
 List<Clause> getClauses()
           
 String getName()
          The name of the individual clause, this should be unique amongst the implementations otherwise the clauses will be treated as the "same" type of clause.
 String toString()
          Return a string representation of the clause.
 

Method Detail

getName

String getName()
The name of the individual clause, this should be unique amongst the implementations otherwise the clauses will be treated as the "same" type of clause.

Returns:
the name of the individual clause.

getClauses

List<Clause> getClauses()
Returns:
child clauses if the clause has any, empty list if it has none.

accept

<R> R accept(ClauseVisitor<R> visitor)
Allows us to perform operations over the clauses based on the passed in visitor. This method calls the visit method on the visitor with this reference.

Parameters:
visitor - the visitor to accept.
Returns:
the result of the visit operation who's type is specified by the incoming visitor.

toString

String toString()
Return a string representation of the clause. This string representation should not be used to represent the clause to the user as it may not be valid. For example, this method makes no attempt to escape invalid names and strings.

Overrides:
toString in class Object
Returns:
the string representation of the clause.


Copyright © 2002-2013 Atlassian. All Rights Reserved.