com.accountingenhancements.formula
Class FormulaFunction_Len

java.lang.Object
  extended by com.accountingenhancements.formula.FormulaFunction
      extended by com.accountingenhancements.formula.FormulaFunction_Len

public class FormulaFunction_Len
extends FormulaFunction


Field Summary
protected static java.lang.String[][] requiredArguments
           
protected static java.lang.String[] returnValueDescription
           
 
Fields inherited from class com.accountingenhancements.formula.FormulaFunction
functionArgumentStack
 
Constructor Summary
FormulaFunction_Len(FormulaVariable functionVariable)
          Create a new FormulaFunction from the functionVariable (A FormulaVariable of TYPE_FUNCTION).
This is the most common constructor used.
FormulaFunction_Len(FormulaVariableStack functionArgumentStack)
          Create a new FormulaFunction with an already defined functionArgumentStack.
FormulaFunction_Len(java.lang.String functionArgumentString)
          Create a new FormulaFunction with a comma-delimited string representing the arguments needed by the function
FormulaFunction_Len(java.lang.String functionArgumentString, int level)
          Create a new FormulaFunction with a comma-delimited string representing the arguments needed by the function
 
Method Summary
static java.lang.String getName()
           
static java.lang.String[][] getRequiredArguments()
           
static java.lang.String[] getReturnValueDescription()
           
protected  FormulaVariable solve(FormulaVariableList variableList, int iteration, SupportParameters supportParameters, FormulaFunctionList functionList, int resolveEverythingAboveLevel)
          Actual method to be overridden.
 
Methods inherited from class com.accountingenhancements.formula.FormulaFunction
function, function, getFunctionArgumentStack, getFunctionArgumentStackFromFunctionVariable, getRequiredFormulaVariables, getRequiredSupportParameters, parseCommaDelimitedFunctionFields, setFunctionArgumentStack
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

requiredArguments

protected static java.lang.String[][] requiredArguments

returnValueDescription

protected static java.lang.String[] returnValueDescription
Constructor Detail

FormulaFunction_Len

public FormulaFunction_Len(FormulaVariableStack functionArgumentStack)
Create a new FormulaFunction with an already defined functionArgumentStack.

Parameters:
functionArgumentStack - a list of FormulaVariables that are needed by the function.

FormulaFunction_Len

public FormulaFunction_Len(java.lang.String functionArgumentString)
                    throws java.text.ParseException
Create a new FormulaFunction with a comma-delimited string representing the arguments needed by the function

Parameters:
functionArgumentString - the string representing the functions arguments. The outer parentheses must be removed.
Example: If the function is IIF(AThrows:
java.text.ParseException - if arguments can't be parsed using parseCommaDelimitedFunctionFields(String,int)

FormulaFunction_Len

public FormulaFunction_Len(java.lang.String functionArgumentString,
                           int level)
                    throws java.text.ParseException
Create a new FormulaFunction with a comma-delimited string representing the arguments needed by the function

Parameters:
functionArgumentString - the string representing the functions arguments. The outer parentheses must be removed.
Example: If the function is IIF(Alevel - the level applied to the creation of FormulaVariables for the arguments.
Throws:
java.text.ParseException - if arguments can't be parsed using parseCommaDelimitedFunctionFields(String,int)

FormulaFunction_Len

public FormulaFunction_Len(FormulaVariable functionVariable)
                    throws java.text.ParseException
Create a new FormulaFunction from the functionVariable (A FormulaVariable of TYPE_FUNCTION).
This is the most common constructor used.

Parameters:
functionVariable - a FormulaVariable of TYPE_FUNCTION
Throws:
java.text.ParseException - if arguments can't be parsed using parseCommaDelimitedFunctionFields(String,int)
Method Detail

solve

protected FormulaVariable solve(FormulaVariableList variableList,
                                int iteration,
                                SupportParameters supportParameters,
                                FormulaFunctionList functionList,
                                int resolveEverythingAboveLevel)
                         throws java.text.ParseException,
                                java.lang.ArithmeticException,
                                java.lang.ClassNotFoundException
Description copied from class: FormulaFunction
Actual method to be overridden.

Overrides:
solve in class FormulaFunction
Throws:
java.text.ParseException
java.lang.ArithmeticException
java.lang.ClassNotFoundException

getName

public static java.lang.String getName()
Returns:
the name of this function

getRequiredArguments

public static java.lang.String[][] getRequiredArguments()
Returns:
String[][] of needed arguments and their dataTypes which as {{"Test Argument ARG1","TYPE_BOOLEAN"},{"True Argument ARG2","TYPE_?"},{"False Argument ARG3","TYPE_?"}}
If handing this routine a FormulaVariableStack functionArgumentStack then the FormulaVariable arguments should be named, ARG1, ARG2, etc...

getReturnValueDescription

public static java.lang.String[] getReturnValueDescription()
Returns:
String[] description of the return value as well as it's data type