Class LastItemExpression
java.lang.Object
net.sf.saxon.expr.Expression
net.sf.saxon.expr.UnaryExpression
net.sf.saxon.expr.SingleItemFilter
net.sf.saxon.expr.LastItemExpression
- All Implemented Interfaces:
Serializable, SourceLocator, LocationProvider, SaxonLocator, InstructionInfo, Locator
A LastItemExpression returns the last item in the sequence returned by a given
base expression. The evaluation strategy is to read the input sequence with a one-item lookahead.
- See Also:
-
Field Summary
Fields inherited from class UnaryExpression
operand -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy()Copy an expression.evaluateItem(XPathContext context) Evaluate the expressionGet a name identifying the kind of expression, in terms meaningful to a user.Methods inherited from class SingleItemFilter
computeCardinality, optimize, promoteMethods inherited from class UnaryExpression
computeSpecialProperties, displayOperator, equals, explain, getBaseExpression, getItemType, hashCode, iterateSubExpressions, replaceSubExpression, simplify, toString, typeCheckMethods inherited from class Expression
addToPathMap, adoptChildExpression, checkForUpdatingSubexpressions, checkPermittedContents, computeDependencies, computeStaticProperties, doPromotion, dynamicError, effectiveBooleanValue, evaluateAsString, evaluatePendingUpdates, explain, getCardinality, getColumnNumber, getColumnNumber, getConstructType, getContainer, getDependencies, getEvaluationMethod, getExecutable, getHostLanguage, getImplementationMethod, getIntegerBounds, getIntrinsicDependencies, getLineNumber, getLineNumber, getLocationId, getLocationProvider, getObjectName, getProperties, getProperty, getPublicId, getSlotsUsed, getSpecialProperties, getSystemId, getSystemId, hasLoopingSubexpression, hasVariableBinding, implementsStaticTypeCheck, isSubtreeExpression, isUpdatingExpression, isVacuousExpression, iterate, iterateEvents, iterateSameFocusSubExpressions, markTailFunctionCalls, process, resetLocalStaticProperties, setContainer, setEvaluationMethod, setFiltered, setFlattened, setLocationId, staticTypeCheck, suppressValidation, typeError
-
Constructor Details
-
LastItemExpression
Constructor- Parameters:
base- A sequence expression denoting sequence whose first item is to be returned
-
-
Method Details
-
copy
Copy an expression. This makes a deep copy.- Specified by:
copyin classExpression- Returns:
- the copy of the original expression
-
evaluateItem
Evaluate the expression- Overrides:
evaluateItemin classExpression- Parameters:
context- The context in which the expression is to be evaluated- Returns:
- the node or atomic value that results from evaluating the expression; or null to indicate that the result is an empty sequence
- Throws:
XPathException- if any dynamic error occurs evaluating the expression
-
getExpressionName
Description copied from class:ExpressionGet a name identifying the kind of expression, in terms meaningful to a user.- Overrides:
getExpressionNamein classExpression- Returns:
- a name identifying the kind of expression, in terms meaningful to a user. The name will always be in the form of a lexical XML QName, and should match the name used in explain() output displaying the expression.
-