Package com.atlassian.query.clause
Interface Clause
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
ChangedClause
,TerminalClause
,WasClause
- All Known Implementing Classes:
AndClause
,ChangedClauseImpl
,MultiClause
,NotClause
,OrClause
,TerminalClauseImpl
,WasClauseImpl
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
Modifier and TypeMethodDescription<R> R
accept
(ClauseVisitor<R> visitor) Allows us to perform operations over the clauses based on the passed in visitor.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.toString()
Return a string representation of the clause.
-
Method Details
-
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
- Returns:
- child clauses if the clause has any, empty list if it has none.
-
accept
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.
-