public abstract class PositionAndLast extends ContextAccessorFunction
Modifier and Type | Class and Description |
---|---|
static class |
PositionAndLast.Last |
static class |
PositionAndLast.Position |
Constructor and Description |
---|
PositionAndLast() |
Modifier and Type | Method and Description |
---|---|
Function |
bindContext(XPathContext context)
Bind a context item to appear as part of the function's closure.
|
IntegerValue |
call(XPathContext context,
Sequence[] arguments)
Evaluate the expression
|
abstract Int64Value |
evaluateItem(XPathContext c)
Evaluate in a general context
|
IntegerValue[] |
getIntegerBounds()
For an expression that returns an integer or a sequence of integers, get
a lower and upper bound on the values of the integers that may be returned, from
static analysis.
|
int |
getNetCost()
Get an estimate of the net cost of evaluating the function, excluding the cost of evaluating
its arguments.
|
boolean |
isContextPossiblyUndefined()
Ask whether the context item may possibly be undefined
|
void |
supplyTypeInformation(ExpressionVisitor visitor,
ContextItemStaticInfo contextInfo,
Expression[] arguments)
Method called during static type checking.
|
dependsOnContextItem, dynamicCall, equals, export, exportAdditionalArguments, exportAttributes, fixArguments, getArity, getCardinality, getCompilerName, getContextNode, getDescription, getDetails, getErrorCodeForTypeErrors, getFunctionItemType, getFunctionName, getOperandRoles, getRequiredType, getResultItemType, getResultItemType, getRetainedStaticContext, getSpecialProperties, getStaticBaseUriString, getStreamerName, importAttributes, isTrustedResultType, makeCall, makeFunction, makeFunctionCall, makeOptimizedFunctionCall, resultIfEmpty, setArity, setDetails, setRetainedStaticContext, typeCheckCaller
atomize, deepEquals, effectiveBooleanValue, getAnnotations, getStringValue, getStringValueCS, isArray, isMap, makeNewContext, simplify, typeCheck
getLength, head, isStreamed, itemAt, iterate, reduce, subsequence
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getLength, head, itemAt, reduce, subsequence
public int getNetCost()
getNetCost
in class SystemFunction
public Function bindContext(XPathContext context) throws XPathException
bindContext
in class ContextAccessorFunction
context
- the context to which the function applies. Must not be null.XPathException
public IntegerValue[] getIntegerBounds()
getIntegerBounds
in class SystemFunction
public void supplyTypeInformation(ExpressionVisitor visitor, ContextItemStaticInfo contextInfo, Expression[] arguments) throws XPathException
SystemFunction
supplyTypeInformation
in class SystemFunction
visitor
- an expression visitor, providing access to the static context and configurationcontextInfo
- information about whether the context item is set, and what its type isarguments
- the expressions appearing as arguments in the function callXPathException
public boolean isContextPossiblyUndefined()
public abstract Int64Value evaluateItem(XPathContext c) throws XPathException
XPathException
public IntegerValue call(XPathContext context, Sequence[] arguments) throws XPathException
call
in interface Callable
call
in interface Function
call
in class ContextAccessorFunction
context
- the dynamic evaluation contextarguments
- the values of the arguments, supplied as SequencesXPathException
- if a dynamic error occurs during the evaluation of the expressionCopyright (c) 2004-2018 Saxonica Limited. All rights reserved.