public class StringLength extends Function
staticContext
Constructor | Description |
---|---|
StringLength() |
Modifier and Type | Method | Description |
---|---|---|
Value |
evaluate(Context c) |
Evaluate in a general context
|
double |
evaluateAsNumber(Context c) |
Evaluate the function in a numeric context
|
int |
getDataType() |
Determine the data type of the expression
|
int |
getDependencies() |
Determine the dependencies
|
java.lang.String |
getName() |
Function name (for diagnostics)
|
Expression |
reduce(int dep,
Context c) |
Reduce the dependencies
|
Expression |
simplify() |
Simplify and validate.
|
containsReferences, enumerate, evaluateAsBoolean, evaluateAsNodeSet, evaluateAsString, getStaticContext, indent, isContextDocumentNodeSet, make, outputStringValue, setStaticContext, usesCurrent
addArgument, checkArgumentCount, display, getNumberOfArguments
public java.lang.String getName()
public int getDataType()
getDataType
in class Expression
public Expression simplify() throws XPathException
simplify
in class Expression
XPathException
public double evaluateAsNumber(Context c) throws XPathException
evaluateAsNumber
in class Expression
c
- The context in which the expression is to be evaluatedXPathException
public Value evaluate(Context c) throws XPathException
evaluate
in class Expression
c
- The context in which the expression is to be evaluatedXPathException
public int getDependencies()
getDependencies
in class Expression
public Expression reduce(int dep, Context c) throws XPathException
reduce
in class Expression
dep
- The dependencies to be removed, e.g. Context.VARIABLESc
- The context to be used for the partial evaluationXPathException