com.atlassian.query.operand
Class MultiValueOperand

java.lang.Object
  extended by com.atlassian.query.operand.MultiValueOperand
All Implemented Interfaces:
Operand

public final class MultiValueOperand
extends java.lang.Object
implements Operand

Used to represent a multiple constant values as an Operand.

Since:
v4.0

Field Summary
static java.lang.String OPERAND_NAME
           
 
Constructor Summary
MultiValueOperand(java.util.Collection<? extends Operand> values)
           
MultiValueOperand(java.lang.Long... longs)
           
MultiValueOperand(Operand... operands)
           
MultiValueOperand(QueryLiteral... literals)
           
MultiValueOperand(java.lang.String... stringValues)
           
 
Method Summary
<R> R
accept(OperandVisitor<R> visitor)
          Allows us to perform operations over the operand based on the passed in visitor.
 boolean equals(java.lang.Object o)
           
 java.lang.String getDisplayString()
          Produces the unexpanded representation of the Operand.
 java.lang.String getName()
          The name that represents this Operand.
 java.util.List<Operand> getValues()
           
 int hashCode()
           
static MultiValueOperand ofQueryLiterals(java.util.Collection<QueryLiteral> literals)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OPERAND_NAME

public static final java.lang.String OPERAND_NAME
See Also:
Constant Field Values
Constructor Detail

MultiValueOperand

public MultiValueOperand(java.lang.String... stringValues)

MultiValueOperand

public MultiValueOperand(java.lang.Long... longs)

MultiValueOperand

public MultiValueOperand(Operand... operands)

MultiValueOperand

public MultiValueOperand(QueryLiteral... literals)

MultiValueOperand

public MultiValueOperand(java.util.Collection<? extends Operand> values)
Method Detail

ofQueryLiterals

public static MultiValueOperand ofQueryLiterals(java.util.Collection<QueryLiteral> literals)

getValues

public java.util.List<Operand> getValues()

getName

public java.lang.String getName()
Description copied from interface: Operand
The name that represents this Operand.

Specified by:
getName in interface Operand
Returns:
the name of the operand, null if the operand is unnamed. If an operand is unnamed then it likely represents literal values (such as Strings or Longs).

getDisplayString

public java.lang.String getDisplayString()
Description copied from interface: Operand
Produces the unexpanded representation of the Operand. In the case of a function operand this would be the function as represented in the Query (i.e. group(jira-users)).

Specified by:
getDisplayString in interface Operand
Returns:
a string that represents this operand as represented in the JQL query string.

accept

public <R> R accept(OperandVisitor<R> visitor)
Description copied from interface: Operand
Allows us to perform operations over the operand based on the passed in visitor. This method calls the visit method on the visitor with this reference.

Specified by:
accept in interface Operand
Type Parameters:
R - the return type for the visitor.
Parameters:
visitor - the visitor to accept.
Returns:
the result of the visit operation who's type is specified by the incomming visitor.

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object


Copyright © 2002-2010 Atlassian. All Rights Reserved.