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-expressionvoid
Diagnostic print of expression structure.int
An 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 zeroboolean
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 loopiterator()
Get an iterator over the sort key definitionsoperands()
Get the operands of this SortKeyDefinitionList, treating it as a pseudo-expression.int
size()
Ask how many sort key definitions there areMethods inherited from class net.sf.saxon.expr.PseudoExpression
computeCardinality, effectiveBooleanValue, evaluateAsString, evaluateItem, getElaborator, getItemType, iterate, process
Methods inherited from class net.sf.saxon.expr.Expression
addToPathMap, adoptChildExpression, allowExtractingCommonSubexpressions, checkedOperands, checkForUpdatingSubexpressions, checkPermittedContents, computeDependencies, computeHashCode, computeSpecialProperties, computeStaticProperties, dispatchTailCall, dynamicError, equals, explain, getCardinality, getConfiguration, getCost, getDependencies, getEvaluationMethod, getExpressionName, getExtraProperty, getIntegerBounds, 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, makeElaborator, markTailFunctionCalls, operandList, operandSparseList, optimize, optimizeChildren, prepareForStreaming, resetLocalStaticProperties, restoreParentPointers, setEvaluationMethod, setExtraProperty, setFiltered, setFlattened, setLocation, setParentExpression, setRetainedStaticContext, setRetainedStaticContextLocally, setRetainedStaticContextThoroughly, setStaticProperty, simplify, simplifyChildren, staticTypeCheck, supportsLazyEvaluation, suppressValidation, toPattern, toShortString, toString, typeCheck, typeCheckChildren, typeError, unordered, verifyParentPointers, withLocation
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods 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:
operands
in 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:
isLiftable
in classExpression
- Parameters:
forStreaming
- true if we're optimising for streamed execution- Returns:
- for a
SortKeyDefinitionList
, always false
-
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:
iterator
in interfaceIterable<SortKeyDefinition>
- Returns:
- an iterator over the sort key definitions
-
copy
Copy this pseudo-expression- Specified by:
copy
in classExpression
- Parameters:
rebindings
- the rebinding map- 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:
getImplementationMethod
in classPseudoExpression
- Returns:
- the implementation method, for example
Expression.ITERATE_METHOD
orExpression.EVALUATE_METHOD
orExpression.PROCESS_METHOD
-
export
Description copied from class:Expression
Diagnostic print of expression structure. The abstract expression tree is written to the supplied output destination.- Specified by:
export
in interfaceExportAgent
- Specified by:
export
in 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.
-