csheets.core.formula
Interface UnaryOperator

All Superinterfaces:
Operator, Serializable
All Known Implementing Classes:
Negator, Percent

public interface UnaryOperator
extends Operator

A unary operator in a formula.

Author:
Einar Pehrson

Method Summary
 Value applyTo(Expression operand)
          Applies the operator to the given operand and returns the result.
 boolean isPrefix()
          Returns whether the operator is a prefix operator, i.e. it appears before its operand.
 
Methods inherited from interface csheets.core.formula.Operator
getIdentifier, getOperandValueType
 

Method Detail

applyTo

Value applyTo(Expression operand)
              throws IllegalValueTypeException
Applies the operator to the given operand and returns the result.

Returns:
the result of the operation
Throws:
IllegalValueTypeException - if the value of the operand is not of the expected type

isPrefix

boolean isPrefix()
Returns whether the operator is a prefix operator, i.e. it appears before its operand.

Returns:
true for prefix operators, false for postfix operators