public class NumberSequenceFormatter extends Expression
EFFECTIVE_BOOLEAN_VALUE, EVALUATE_METHOD, ITEM_FEED_METHOD, ITERATE_METHOD, MAX_SEQUENCE_LENGTH, MAX_STRING_LENGTH, PROCESS_METHOD, staticProperties, UNBOUNDED_LOWER, UNBOUNDED_UPPER, UPDATE_METHOD, WATCH_METHOD
Constructor and Description |
---|
NumberSequenceFormatter(Expression value,
Expression format,
Expression groupSize,
Expression groupSeparator,
Expression letterValue,
Expression ordinal,
Expression startAt,
Expression lang,
NumberFormatter formatter,
boolean backwardsCompatible)
Construct a NumberSequenceFormatter
|
Modifier and Type | Method and Description |
---|---|
int |
computeCardinality()
Compute the static cardinality of this expression
|
Expression |
copy(RebindingMap rebindings)
Copy an expression.
|
Item |
evaluateItem(XPathContext context)
Evaluate an expression as a single item.
|
void |
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().
|
ItemType |
getItemType()
Determine the static item type of the expression, as precisely possible.
|
java.lang.Iterable<Operand> |
operands()
Get the immediate sub-expressions of this expression, with information about the relationship
of each expression to its parent expression.
|
java.util.List<java.lang.Integer> |
parseStartAtValue(java.lang.String value) |
void |
preallocateNumberer(Configuration config) |
Expression |
simplify()
Simplify an expression.
|
addToPathMap, adoptChildExpression, allowExtractingCommonSubexpressions, checkedOperands, checkForUpdatingSubexpressions, checkPermittedContents, computeDependencies, computeHashCode, computeSpecialProperties, computeStaticProperties, dynamicError, effectiveBooleanValue, evaluateAsString, evaluatePendingUpdates, explain, getCardinality, getConfiguration, getConstructType, 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, hasCompatibleStaticContext, hashCode, hasVariableBinding, identityHashCode, implementsStaticTypeCheck, isCallOn, isCallOnSystemFunction, isIdentical, isInstruction, isLiftable, isMultiThreaded, isSameExpression, isStaticPropertiesKnown, isSubtreeExpression, isUpdatingExpression, isVacuousExpression, iterate, markTailFunctionCalls, operandList, operandSparseList, optimize, optimizeChildren, process, resetLocalStaticProperties, restoreParentPointers, setEvaluationMethod, setExtraProperty, setFiltered, setFlattened, setLocation, setParentExpression, setRetainedStaticContext, setRetainedStaticContextLocally, setRetainedStaticContextThoroughly, setStaticProperty, simplifyChildren, staticTypeCheck, suppressValidation, toPattern, toShortString, toString, typeCheck, typeCheckChildren, typeError, unordered, verifyParentPointers, verifyParentPointers
public NumberSequenceFormatter(Expression value, Expression format, Expression groupSize, Expression groupSeparator, Expression letterValue, Expression ordinal, Expression startAt, Expression lang, NumberFormatter formatter, boolean backwardsCompatible)
value
- the expression supplied in the value attribute, or
the NumberInstruction
which computes the place-markerformat
- the expression supplied in the format attributegroupSize
- the expression supplied in the group-size attributegroupSeparator
- the expression supplied in the grouping-separator attributeletterValue
- the expression supplied in the letter-value attributeordinal
- the expression supplied in the ordinal attributestartAt
- the expression supplied in the start-at attributelang
- the expression supplied in the lang attributeformatter
- A NumberFormatter to be usedbackwardsCompatible
- true if running in 1.0 compatibility mode with a real value attributepublic Expression simplify() throws XPathException
simplify
in class Expression
XPathException
- if an error is discovered during expression
rewritingpublic void preallocateNumberer(Configuration config) throws XPathException
XPathException
public java.lang.Iterable<Operand> operands()
Expression
If the expression is a Callable, then it is required that the order of the operands returned by this function is the same as the order of arguments supplied to the corresponding call() method.
operands
in class Expression
public Expression copy(RebindingMap rebindings)
copy
in class Expression
rebindings
- public ItemType getItemType()
Expression
This method should always return a result, though it may be the best approximation that is available at the time.
getItemType
in class Expression
public int computeCardinality()
Expression
computeCardinality
in class Expression
StaticProperty.ALLOWS_ZERO_OR_ONE
,
StaticProperty.EXACTLY_ONE
, StaticProperty.ALLOWS_ONE_OR_MORE
,
StaticProperty.ALLOWS_ZERO_OR_MORE
public int getImplementationMethod()
getImplementationMethod
in class Expression
Expression.ITERATE_METHOD
or Expression.EVALUATE_METHOD
or
Expression.PROCESS_METHOD
public Item evaluateItem(XPathContext context) throws XPathException
Expression
evaluateItem
in class Expression
context
- The context in which the expression is to be evaluatedXPathException
- if any dynamic error occurs evaluating the
expressionpublic java.util.List<java.lang.Integer> parseStartAtValue(java.lang.String value) throws XPathException
XPathException
public void export(ExpressionPresenter out) throws XPathException
export
in interface ExportAgent
export
in class Expression
out
- the expression presenter used to display the structureXPathException
- if the export fails, for example if an expression is found that won't work
in the target environment.Copyright (c) 2004-2018 Saxonica Limited. All rights reserved.