org.apache.poi.hssf.record.formula.functions
Class TextFunction

java.lang.Object
  extended by org.apache.poi.hssf.record.formula.functions.TextFunction
All Implemented Interfaces:
Function
Direct Known Subclasses:
Replace, Substitute

public abstract class TextFunction
extends java.lang.Object
implements Function

Author:
Amol S. Deshmukh < amolweb at ya hoo dot com >

Field Summary
static Function CONCATENATE
           
protected static java.lang.String EMPTY_STRING
           
static Function EXACT
           
static Function LEFT
           
static Function LEN
           
static Function LOWER
           
static Function MID
          An implementation of the MID function
MID returns a specific number of characters from a text string, starting at the specified position.

Syntax:
MID(text, start_num, num_chars)

static Function RIGHT
           
static Function TRIM
          An implementation of the TRIM function: Removes leading and trailing spaces from value if evaluated operand value is string.
static Function UPPER
           
 
Constructor Summary
TextFunction()
           
 
Method Summary
 Eval evaluate(Eval[] args, int srcCellRow, short srcCellCol)
           
protected abstract  ValueEval evaluateFunc(Eval[] args, int srcCellRow, short srcCellCol)
           
protected static int evaluateIntArg(Eval arg, int srcCellRow, short srcCellCol)
           
protected static java.lang.String evaluateStringArg(Eval eval, int srcRow, short srcCol)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY_STRING

protected static final java.lang.String EMPTY_STRING
See Also:
Constant Field Values

LEN

public static final Function LEN

LOWER

public static final Function LOWER

UPPER

public static final Function UPPER

TRIM

public static final Function TRIM
An implementation of the TRIM function: Removes leading and trailing spaces from value if evaluated operand value is string.


MID

public static final Function MID
An implementation of the MID function
MID returns a specific number of characters from a text string, starting at the specified position.

Syntax:
MID(text, start_num, num_chars)


LEFT

public static final Function LEFT

RIGHT

public static final Function RIGHT

CONCATENATE

public static final Function CONCATENATE

EXACT

public static final Function EXACT
Constructor Detail

TextFunction

public TextFunction()
Method Detail

evaluateStringArg

protected static final java.lang.String evaluateStringArg(Eval eval,
                                                          int srcRow,
                                                          short srcCol)
                                                   throws EvaluationException
Throws:
EvaluationException

evaluateIntArg

protected static final int evaluateIntArg(Eval arg,
                                          int srcCellRow,
                                          short srcCellCol)
                                   throws EvaluationException
Throws:
EvaluationException

evaluate

public final Eval evaluate(Eval[] args,
                           int srcCellRow,
                           short srcCellCol)
Specified by:
evaluate in interface Function

evaluateFunc

protected abstract ValueEval evaluateFunc(Eval[] args,
                                          int srcCellRow,
                                          short srcCellCol)
                                   throws EvaluationException
Throws:
EvaluationException


Copyright 2008 The Apache Software Foundation or its licensors, as applicable.