public class CoreFunction extends Operation
Expression.PointerIterator, Expression.ValueIterator
NOT_A_NUMBER, ONE
Constructor and Description |
---|
CoreFunction(int functionCode,
Expression[] args)
Create a new CoreFunction.
|
Modifier and Type | Method and Description |
---|---|
Object |
compute(EvalContext context)
Evaluates the expression.
|
boolean |
computeContextDependent()
Returns true if any argument is context dependent or if
the function is last(), position(), boolean(), local-name(),
name(), string(), lang(), number().
|
Object |
computeValue(EvalContext context)
Evaluates the expression.
|
protected Object |
functionBoolean(EvalContext context)
boolean() implementation.
|
protected Object |
functionCeiling(EvalContext context)
ceiling() implementation.
|
protected Object |
functionConcat(EvalContext context)
concat() implementation.
|
protected Object |
functionContains(EvalContext context)
contains() implementation.
|
protected Object |
functionCount(EvalContext context)
count() implementation.
|
protected Object |
functionEndsWith(EvalContext context)
ends-with() implementation.
|
protected Object |
functionFalse(EvalContext context)
false() implementation.
|
protected Object |
functionFloor(EvalContext context)
floor() implementation.
|
protected Object |
functionID(EvalContext context)
id() implementation.
|
protected Object |
functionKey(EvalContext context)
key() implementation.
|
protected Object |
functionLang(EvalContext context)
lang() implementation.
|
protected Object |
functionLast(EvalContext context)
last() implementation.
|
protected Object |
functionLocalName(EvalContext context)
local-name() implementation.
|
protected Object |
functionName(EvalContext context)
name() implementation.
|
protected Object |
functionNamespaceURI(EvalContext context)
namespace-uri() implementation.
|
protected Object |
functionNormalizeSpace(EvalContext context)
normalize-space() implementation.
|
protected Object |
functionNot(EvalContext context)
not() implementation.
|
protected Object |
functionNull(EvalContext context)
null() implementation.
|
protected Object |
functionNumber(EvalContext context)
number() implementation.
|
protected Object |
functionPosition(EvalContext context)
position() implementation.
|
protected Object |
functionRound(EvalContext context)
round() implementation.
|
protected Object |
functionStartsWith(EvalContext context)
starts-with() implementation.
|
protected Object |
functionString(EvalContext context)
string() implementation.
|
protected Object |
functionStringLength(EvalContext context)
string-length() implementation.
|
protected Object |
functionSubstring(EvalContext context)
substring() implementation.
|
protected Object |
functionSubstringAfter(EvalContext context)
substring-after() implementation.
|
protected Object |
functionSubstringBefore(EvalContext context)
substring-before() implementation.
|
protected Object |
functionSum(EvalContext context)
sum() implementation.
|
protected Object |
functionTranslate(EvalContext context)
translate() implementation.
|
protected Object |
functionTrue(EvalContext context)
true() implementation.
|
Expression |
getArg1()
Convenience method to return the first argument.
|
Expression |
getArg2()
Convenience method to return the second argument.
|
Expression |
getArg3()
Convenience method to return the third argument.
|
int |
getArgumentCount()
Return the number of argument Expressions.
|
int |
getFunctionCode()
Get the function code.
|
protected String |
getFunctionName()
Get the name of this function.
|
String |
toString() |
getArguments
isContextDependent, iterate, iteratePointers
public CoreFunction(int functionCode, Expression[] args)
functionCode
- int function codeargs
- argument Expressionspublic int getFunctionCode()
protected String getFunctionName()
public Expression getArg1()
public Expression getArg2()
public Expression getArg3()
public int getArgumentCount()
public boolean computeContextDependent()
computeContextDependent
in class Operation
public Object compute(EvalContext context)
Expression
compute
in class Expression
context
- evaluation contextpublic Object computeValue(EvalContext context)
Expression
computeValue
in class Expression
context
- evaluation contextprotected Object functionLast(EvalContext context)
context
- evaluation contextprotected Object functionPosition(EvalContext context)
context
- evaluation contextprotected Object functionCount(EvalContext context)
context
- evaluation contextprotected Object functionLang(EvalContext context)
context
- evaluation contextprotected Object functionID(EvalContext context)
context
- evaluation contextprotected Object functionKey(EvalContext context)
context
- evaluation contextprotected Object functionNamespaceURI(EvalContext context)
context
- evaluation contextprotected Object functionLocalName(EvalContext context)
context
- evaluation contextprotected Object functionName(EvalContext context)
context
- evaluation contextprotected Object functionString(EvalContext context)
context
- evaluation contextprotected Object functionConcat(EvalContext context)
context
- evaluation contextprotected Object functionStartsWith(EvalContext context)
context
- evaluation contextprotected Object functionEndsWith(EvalContext context)
context
- evaluation contextprotected Object functionContains(EvalContext context)
context
- evaluation contextprotected Object functionSubstringBefore(EvalContext context)
context
- evaluation contextprotected Object functionSubstringAfter(EvalContext context)
context
- evaluation contextprotected Object functionSubstring(EvalContext context)
context
- evaluation contextprotected Object functionStringLength(EvalContext context)
context
- evaluation contextprotected Object functionNormalizeSpace(EvalContext context)
context
- evaluation contextprotected Object functionTranslate(EvalContext context)
context
- evaluation contextprotected Object functionBoolean(EvalContext context)
context
- evaluation contextprotected Object functionNot(EvalContext context)
context
- evaluation contextprotected Object functionTrue(EvalContext context)
context
- evaluation contextprotected Object functionFalse(EvalContext context)
context
- evaluation contextprotected Object functionNull(EvalContext context)
context
- evaluation contextprotected Object functionNumber(EvalContext context)
context
- evaluation contextprotected Object functionSum(EvalContext context)
context
- evaluation contextprotected Object functionFloor(EvalContext context)
context
- evaluation contextprotected Object functionCeiling(EvalContext context)
context
- evaluation contextprotected Object functionRound(EvalContext context)
context
- evaluation contextCopyright © 2001–2015 The Apache Software Foundation. All rights reserved.