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:
java.lang.Iterable<SortKeyDefinition>
,ExportAgent
,Locatable
,IdentityComparable
,Traceable
public class SortKeyDefinitionList extends PseudoExpression implements java.lang.Iterable<SortKeyDefinition>
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
Constructors Constructor Description SortKeyDefinitionList(SortKeyDefinition[] sortKeyDefinitions)
Create a list of sort key definitions
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SortKeyDefinitionList
copy(RebindingMap rebindings)
Copy this pseudo-expressionvoid
export(ExpressionPresenter out)
Diagnostic print of expression structure.int
getImplementationMethod()
An implementation of Expression must provide at least one of the methods evaluateItem(), iterate(), or process().SortKeyDefinition
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 loopjava.util.Iterator<SortKeyDefinition>
iterator()
Get an iterator over the sort key definitionsjava.lang.Iterable<Operand>
operands()
Get the operands of this SortKeyDefinitionList, treating it as a pseudo-expression.int
size()
Ask how many sort key definitions there are-
Methods 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 net.sf.saxon.trace.Traceable
gatherProperties
-
-
-
-
Constructor Detail
-
SortKeyDefinitionList
public SortKeyDefinitionList(SortKeyDefinition[] sortKeyDefinitions)
Create a list of sort key definitions- Parameters:
sortKeyDefinitions
- the sort key definitions, supplied as an array
-
-
Method Detail
-
operands
public java.lang.Iterable<Operand> 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
public SortKeyDefinition getSortKeyDefinition(int i)
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
public java.util.Iterator<SortKeyDefinition> iterator()
Get an iterator over the sort key definitions- Specified by:
iterator
in interfacejava.lang.Iterable<SortKeyDefinition>
- Returns:
- an iterator over the sort key definitions
-
copy
public SortKeyDefinitionList copy(RebindingMap rebindings)
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
public void export(ExpressionPresenter out) throws XPathException
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.
-
-