csheets.core.formula
Class FunctionParameter

java.lang.Object
  extended by csheets.core.formula.FunctionParameter
All Implemented Interfaces:
Serializable

public class FunctionParameter
extends Object
implements Serializable

A parameter of a function, i.e. the definition of a valid argument.

Author:
Einar Pehrson
See Also:
Serialized Form

Constructor Summary
FunctionParameter(Value.Type valueType, String name, boolean optional, String description)
          Creates a new function parameter.
 
Method Summary
 String getDescription()
          Returns the description of the argument.
 String getName()
          Returns the name of the argument.
 Value.Type getValueType()
          Returns the value type of the argument.
 boolean isOptional()
          Returns whether the parameter is optional.
 String toString()
          Returns a string representation of the parameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FunctionParameter

public FunctionParameter(Value.Type valueType,
                         String name,
                         boolean optional,
                         String description)
Creates a new function parameter.

Parameters:
name - the name of the argument
optional - whether the parameter is optional
description - the description of the argument
Method Detail

getValueType

public Value.Type getValueType()
Returns the value type of the argument.

Returns:
the value type of the argument

getName

public String getName()
Returns the name of the argument.

Returns:
the name of the argument

isOptional

public boolean isOptional()
Returns whether the parameter is optional.

Returns:
whether the parameter is optional

getDescription

public String getDescription()
Returns the description of the argument.

Returns:
the description of the argument

toString

public String toString()
Returns a string representation of the parameter.

Overrides:
toString in class Object
Returns:
a string representation of the parameter