public class TerminalClauseImpl extends Object implements TerminalClause
Constructor and Description |
---|
TerminalClauseImpl(String name,
Long... values)
A convienience constructor that will create a clause with the
Operator.EQUALS
operator if there is only one value in the array and with the Operator.IN
operator if there are more than one value in the array. |
TerminalClauseImpl(String name,
Operator operator,
long operand)
Creates a terminal clause with the specified name, operator and turns the long value into a
SingleValueOperand populated with a long value. |
TerminalClauseImpl(String name,
Operator operator,
Operand operand)
Creates a terminal clause with the specified name, operator and operand.
|
TerminalClauseImpl(String name,
Operator operator,
Operand operand,
com.atlassian.fugue.Option<Property> property)
Creates a terminal clause with the specified name, operator, operand and property.
|
TerminalClauseImpl(String name,
Operator operator,
String operand)
Creates a terminal clause with the specified name, operator and turns the string value into a
SingleValueOperand populated with a string value. |
TerminalClauseImpl(String name,
String... values)
A convienience constructor that will create a clause with the
Operator.EQUALS
operator if there is only one value in the array and with the Operator.IN
operator if there are more than one value in the array. |
Modifier and Type | Method and Description |
---|---|
<R> R |
accept(ClauseVisitor<R> visitor)
Allows us to perform operations over the clauses based on the passed in visitor.
|
boolean |
equals(Object o) |
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.
|
Operand |
getOperand() |
Operator |
getOperator() |
com.atlassian.fugue.Option<Property> |
getProperty() |
int |
hashCode() |
String |
toString()
Return a string representation of the clause.
|
public TerminalClauseImpl(String name, Operator operator, String operand)
SingleValueOperand
populated with a string value.name
- the name for the clause.operator
- the operator for the clause.operand
- the string value that will be wrapped in a SingleValueOperand.public TerminalClauseImpl(String name, Operator operator, long operand)
SingleValueOperand
populated with a long value.name
- the name for the clause.operator
- the operator for the clause.operand
- the long value that will be wrapped in a SingleValueOperand.public TerminalClauseImpl(String name, Operator operator, Operand operand)
name
- the name for the clause.operator
- the operator for the clause.operand
- the right-hand-side value of the clause.public TerminalClauseImpl(String name, Operator operator, Operand operand, com.atlassian.fugue.Option<Property> property)
name
- the name for the clause.operator
- the operator for the clause.operand
- the right-hand-side value of the clause.property
- the name of the property.public TerminalClauseImpl(String name, String... values)
Operator.EQUALS
operator if there is only one value in the array and with the Operator.IN
operator if there are more than one value in the array.name
- the name for the clause.values
- the string values that will be turned into SingleValueOperand
's
containing a string value.public TerminalClauseImpl(String name, Long... values)
Operator.EQUALS
operator if there is only one value in the array and with the Operator.IN
operator if there are more than one value in the array.name
- the name for the clause.values
- the long values that will be turned into SingleValueOperand
's
containing a long value.public Operand getOperand()
getOperand
in interface TerminalClause
public Operator getOperator()
getOperator
in interface TerminalClause
Operator
.public com.atlassian.fugue.Option<Property> getProperty()
getProperty
in interface TerminalClause
public String getName()
Clause
public List<Clause> getClauses()
getClauses
in interface Clause
public <R> R accept(ClauseVisitor<R> visitor)
Clause
public String toString()
Clause
Copyright © 2002-2017 Atlassian. All Rights Reserved.