Class EmptySequence
java.lang.Object
net.sf.saxon.value.Value
net.sf.saxon.value.EmptySequence
- All Implemented Interfaces:
Serializable, Expression, ValueRepresentation
An EmptySequence object represents a sequence containing no members.
- See Also:
-
Field Summary
Fields inherited from class Value
EMPTY_CLASS_ARRAYFields inherited from interface Expression
EVALUATE_METHOD, ITERATE_METHOD, PROCESS_METHODFields inherited from interface ValueRepresentation
EMPTY_VALUE_ARRAY -
Method Summary
Modifier and TypeMethodDescriptionvoiddisplay(int level, PrintStream out, Configuration config) Diagnostic print of expression structurebooleaneffectiveBooleanValue(XPathContext context) Get the effective boolean value - always falsebooleanIs this expression the same as another expression?intDetermine the static cardinalityintAn implementation of Expression must provide at least one of the methods evaluateItem(), iterate(), or process().static EmptySequenceGet the implicit instance of this classDetermine the item typefinal intGet the length of the sequenceintGet the static properties of this expression (other than its type).inthashCode()Return a hash code to support the equals() functioniterate(XPathContext context) Return an iteration over the sequenceMethods inherited from class Value
asItem, asIterator, asValue, checkPermittedContents, convert, convertJavaObjectToXPath, convertToJava, evaluateAsString, evaluateItem, getDependencies, getIterator, getParentExpression, getStringValue, getStringValueCS, itemAt, iterateSubExpressions, makeQNameValue, optimize, process, promote, reduce, simplify, stringToNumber, toString, typeCheck
-
Method Details
-
getInstance
Get the implicit instance of this class -
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 prefered. -
iterate
Return an iteration over the sequence- Parameters:
context- The context in which the expression is to be evaluated. Note that this context must contain a stackframe with sufficient slots to allow evaluation of any variables contained in the expression (including variables allocated internally by the optimizer)- Returns:
- a SequenceIterator that can be used to iterate over the result of the expression
-
getItemType
Determine the item type- Specified by:
getItemTypein interfaceExpression- Overrides:
getItemTypein classValue- Parameters:
th-- Returns:
- for the default implementation: AnyItemType (not known)
-
getCardinality
public int getCardinality()Determine the static cardinality- Specified by:
getCardinalityin interfaceExpression- Overrides:
getCardinalityin classValue- Returns:
- one of the values
StaticProperty.ALLOWS_ONE,StaticProperty.ALLOWS_ZERO_OR_MORE,StaticProperty.ALLOWS_ZERO_OR_ONE,StaticProperty.ALLOWS_ONE_OR_MORE,StaticProperty.EMPTY. This default implementation returns ZERO_OR_MORE (which effectively gives no information).
-
getSpecialProperties
public int getSpecialProperties()Get the static properties of this expression (other than its type). The result is bit-signficant. These properties are used for optimizations. In general, if property bit is set, it is true, but if it is unset, the value is unknown.- Specified by:
getSpecialPropertiesin interfaceExpression- Overrides:
getSpecialPropertiesin classValue- Returns:
StaticProperty.NON_CREATIVE
-
getLength
-
equals
Is this expression the same as another expression?- Overrides:
equalsin classValue- Throws:
ClassCastException- if the values are not comparable
-
hashCode
-
effectiveBooleanValue
Get the effective boolean value - always false- Specified by:
effectiveBooleanValuein interfaceExpression- Overrides:
effectiveBooleanValuein classValue- Parameters:
context- The context in which the expression is to be evaluated- Returns:
- the effective boolean value
-
display
Diagnostic print of expression structure- Specified by:
displayin interfaceExpression- Overrides:
displayin classValue- Parameters:
level- indentation level for this expressionout- Output destinationconfig-
-