Class MidFunction
- java.lang.Object
-
- org.pentaho.reporting.libraries.formula.function.text.MidFunction
-
- All Implemented Interfaces:
java.io.Serializable
,Function
public class MidFunction extends java.lang.Object implements Function
This function returns extracted text, given an original text, starting position, and length.- Author:
- Cedric Pronzato
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MidFunction()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TypeValuePair
evaluate(FormulaContext context, ParameterCallback parameters)
java.lang.String
getCanonicalName()
static java.lang.String
process(java.lang.String text, int start, int lengthValue)
Computes the substring for the given text, using the 1-based start index and the given length.
-
-
-
Method Detail
-
evaluate
public TypeValuePair evaluate(FormulaContext context, ParameterCallback parameters) throws EvaluationException
- Specified by:
evaluate
in interfaceFunction
- Throws:
EvaluationException
-
process
public static java.lang.String process(java.lang.String text, int start, int lengthValue)
Computes the substring for the given text, using the 1-based start index and the given length.- Parameters:
text
-start
-lengthValue
-- Returns:
-
getCanonicalName
public java.lang.String getCanonicalName()
- Specified by:
getCanonicalName
in interfaceFunction
-
-