com.atlassian.query.operand
Class FunctionOperand

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

public class FunctionOperand
extends Object
implements Operand

Represents a function in the query tree.

Since:
v4.0

Constructor Summary
FunctionOperand(String name)
           
FunctionOperand(String name, Collection<String> args)
           
FunctionOperand(String name, String... args)
           
 
Method Summary
<R> R
accept(OperandVisitor<R> visitor)
          Allows us to perform operations over the operand based on the passed in visitor.
 boolean equals(Object o)
           
 List<String> getArgs()
           
 String getDisplayString()
          Renders the function call with its name and arguments for display in the UI.
 String getName()
          The name that represents this Operand.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FunctionOperand

public FunctionOperand(String name)

FunctionOperand

public FunctionOperand(String name,
                       String... args)

FunctionOperand

public FunctionOperand(String name,
                       Collection<String> args)
Method Detail

getName

public 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 String getDisplayString()
Renders the function call with its name and arguments for display in the UI.

Specified by:
getDisplayString in interface Operand
Returns:
something that looks like this: shear(sheep, goats).

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.

getArgs

public List<String> getArgs()

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2002-2012 Atlassian. All Rights Reserved.