Package net.sf.saxon.expr.sort
Class SortKeyDefinitionList
java.lang.Object
net.sf.saxon.expr.Expression
net.sf.saxon.expr.PseudoExpression
net.sf.saxon.expr.sort.SortKeyDefinitionList
- All Implemented Interfaces:
Iterable<SortKeyDefinition>,ExportAgent,Locatable,IdentityComparable,Traceable
The class represents a list of sort key definitions in major-to-minor sort key order. It is not a true
expression, because it cannot be evaluated, but it acts as a node in the expression tree, and is therefore
classified as a pseudo-expression.
-
Field Summary
Fields inherited from class net.sf.saxon.expr.Expression
EFFECTIVE_BOOLEAN_VALUE, EVALUATE_METHOD, ITEM_FEED_METHOD, ITERATE_METHOD, MAX_COST, MAX_SEQUENCE_LENGTH, MAX_STRING_LENGTH, PROCESS_METHOD, staticProperties, UNBOUNDED_LOWER, UNBOUNDED_UPPER, UPDATE_METHOD, WATCH_METHOD -
Constructor Summary
ConstructorsConstructorDescriptionSortKeyDefinitionList(SortKeyDefinition[] sortKeyDefinitions) Create a list of sort key definitions -
Method Summary
Modifier and TypeMethodDescriptioncopy(RebindingMap rebindings) Copy this pseudo-expressionvoidDiagnostic print of expression structure.intAn implementation of Expression must provide at least one of the methods evaluateItem(), iterate(), or process().getSortKeyDefinition(int i) Get the i'th sort key definition, counting from zerobooleanisLiftable(boolean forStreaming) Ask whether the expression can be lifted out of a loop, assuming it has no dependencies on the controlling variable/focus of the loopiterator()Get an iterator over the sort key definitionsoperands()Get the operands of this SortKeyDefinitionList, treating it as a pseudo-expression.intsize()Ask how many sort key definitions there areMethods inherited from class net.sf.saxon.expr.PseudoExpression
computeCardinality, effectiveBooleanValue, evaluateAsString, evaluateItem, getItemType, iterate, processMethods inherited from class net.sf.saxon.expr.Expression
addToPathMap, adoptChildExpression, allowExtractingCommonSubexpressions, checkedOperands, checkForUpdatingSubexpressions, checkPermittedContents, computeDependencies, computeHashCode, computeSpecialProperties, computeStaticProperties, dynamicError, equals, evaluatePendingUpdates, explain, getCardinality, getConfiguration, getCost, getDependencies, getEvaluationMethod, getExpressionName, getExtraProperty, getIntegerBounds, getInterpretedExpression, getIntrinsicDependencies, getLocalRetainedStaticContext, getLocation, getNetCost, getObjectName, getPackageData, getParentExpression, getProperties, getProperty, getRetainedStaticContext, getScopingExpression, getSlotsUsed, getSpecialProperties, getStaticBaseURI, getStaticBaseURIString, getStaticType, getStaticUType, getStreamerName, getTracingTag, hasCompatibleStaticContext, hashCode, hasSpecialProperty, hasVariableBinding, identityHashCode, implementsStaticTypeCheck, isCallOn, isEqual, isIdentical, isInstruction, isMultiThreaded, isStaticPropertiesKnown, isSubtreeExpression, isUpdatingExpression, isVacuousExpression, markTailFunctionCalls, operandList, operandSparseList, optimize, optimizeChildren, prepareForStreaming, resetLocalStaticProperties, restoreParentPointers, setEvaluationMethod, setExtraProperty, setFiltered, setFlattened, setLocation, setParentExpression, setRetainedStaticContext, setRetainedStaticContextLocally, setRetainedStaticContextThoroughly, setStaticProperty, simplify, simplifyChildren, staticTypeCheck, suppressValidation, toPattern, toShortString, toString, typeCheck, typeCheckChildren, typeError, unordered, verifyParentPointersMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface net.sf.saxon.trace.Traceable
gatherProperties
-
Constructor Details
-
SortKeyDefinitionList
Create a list of sort key definitions- Parameters:
sortKeyDefinitions- the sort key definitions, supplied as an array
-
-
Method Details
-
operands
Get the operands of this SortKeyDefinitionList, treating it as a pseudo-expression.- Overrides:
operandsin classExpression- Returns:
- the operands: specifically, the contained sort key definitions, each of which is also treated as a pseudo-expression.
-
isLiftable
public boolean isLiftable(boolean forStreaming) Ask whether the expression can be lifted out of a loop, assuming it has no dependencies on the controlling variable/focus of the loop- Overrides:
isLiftablein classExpression- Parameters:
forStreaming-- Returns:
- true if the expression can be loop lifted
-
size
public int size()Ask how many sort key definitions there are- Returns:
- the number of sort key definitions in the list (always one or more)
-
getSortKeyDefinition
Get the i'th sort key definition, counting from zero- Parameters:
i- the index of the required sort key definition- Returns:
- the required sort key definition
-
iterator
Get an iterator over the sort key definitions- Specified by:
iteratorin interfaceIterable<SortKeyDefinition>- Returns:
- an iterator over the sort key definitions
-
copy
Copy this pseudo-expression- Specified by:
copyin classExpression- Parameters:
rebindings-- Returns:
- a deep copy
-
getImplementationMethod
public int getImplementationMethod()An implementation of Expression must provide at least one of the methods evaluateItem(), iterate(), or process(). This method indicates which of these methods is provided directly. The other methods will always be available indirectly, using an implementation that relies on one of the other methods.- Overrides:
getImplementationMethodin classPseudoExpression- Returns:
- the implementation method, for example
Expression.ITERATE_METHODorExpression.EVALUATE_METHODorExpression.PROCESS_METHOD
-
export
Description copied from class:ExpressionDiagnostic print of expression structure. The abstract expression tree is written to the supplied output destination.- Specified by:
exportin interfaceExportAgent- Specified by:
exportin classExpression- Parameters:
out- the expression presenter used to display the structure- Throws:
XPathException- if the export fails, for example if an expression is found that won't work in the target environment.
-