com.atlassian.query.clause
Interface Clause

All Known Subinterfaces:
TerminalClause
All Known Implementing Classes:
AndClause, MultiClause, NotClause, OrClause, TerminalClauseImpl

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.
 java.util.List<Clause> getClauses()
           
 java.lang.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.
 java.lang.String toString()
          Return a string representation of the clause.
 

Method Detail

getName

java.lang.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

java.util.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 incomming visitor.

toString

java.lang.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 java.lang.Object
Returns:
the string representation of the clause.


Copyright © 2002-2010 Atlassian. All Rights Reserved.