csheets.core.formula.lang
Class Concatenator

java.lang.Object
  extended by csheets.core.formula.lang.Concatenator
All Implemented Interfaces:
BinaryOperator, Operator, Serializable

public class Concatenator
extends Object
implements BinaryOperator

A concatenator of strings.

Author:
Einar Pehrson
See Also:
Serialized Form

Constructor Summary
Concatenator()
          Creates a new concatenator.
 
Method Summary
 Value applyTo(Expression leftOperand, Expression rightOperand)
          Applies the operator to the given operands and returns the result.
 String getIdentifier()
          Returns the operator's string identirifer.
 Value.Type getOperandValueType()
          Returns the type of value that the operator's operands can have.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Concatenator

public Concatenator()
Creates a new concatenator.

Method Detail

applyTo

public Value applyTo(Expression leftOperand,
                     Expression rightOperand)
              throws IllegalValueTypeException
Description copied from interface: BinaryOperator
Applies the operator to the given operands and returns the result.

Specified by:
applyTo in interface BinaryOperator
Returns:
the result of the operation
Throws:
IllegalValueTypeException - if the value of an operand is not of the expected type

getIdentifier

public String getIdentifier()
Description copied from interface: Operator
Returns the operator's string identirifer.

Specified by:
getIdentifier in interface Operator
Returns:
a string representation of the operator.

getOperandValueType

public Value.Type getOperandValueType()
Description copied from interface: Operator
Returns the type of value that the operator's operands can have.

Specified by:
getOperandValueType in interface Operator
Returns:
the type of value that the operator's operands can have

toString

public String toString()
Overrides:
toString in class Object