## net.sf.saxon.value
Class EmptySequence

    java.lang.Object
      |
      +--net.sf.saxon.value.Value
            |
            +--net.sf.saxon.value.SequenceValue
                  |
                  +--net.sf.saxon.value.EmptySequence

All Implemented Interfaces:
  Expression, java.io.Serializable

public final class EmptySequence
extends SequenceValue

An EmptySequence object represents a sequence containing no members.

See Also:
  Serialized Form

Field Summary

Fields inherited from interface net.sf.saxon.expr.Expression
`EVALUATE_METHOD, ITERATE_METHOD, PROCESS_METHOD`

Method Summary
`void` `display(int level, NamePool pool, java.io.PrintStream out)` Diagnostic print of expression structure
`boolean` `effectiveBooleanValue(XPathContext context)` Get the effective boolean value - always false
`boolean` `equals(java.lang.Object other)` Is this expression the same as another expression?
`int` `getCardinality()` Determine the static cardinality
`static EmptySequence` `getInstance()` Get the implicit instance of this class
`ItemType` `getItemType()` Determine the item type
`int` `getSpecialProperties()` Get the static properties of this expression (other than its type).
`int` `hashCode()` Return a hash code to support the equals() function
`SequenceIterator` `iterate(XPathContext context)` Return an iteration over the sequence

Methods inherited from class net.sf.saxon.value.SequenceValue
`convertToJava, evaluateAsString, evaluateItem, getImplementationMethod, getStringValue, itemAt, materialize, process`

Methods inherited from class net.sf.saxon.value.Value
`analyze, asItem, asValue, collapseWhitespace, convertJavaObjectToXPath, getDependencies, getParentExpression, inverse, iterateSubExpressions, normalizeWhitespace, promote, simplify, stringToNumber, toString, trimWhitespace`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Method Detail

### getInstance

    public static EmptySequence getInstance()

  Get the implicit instance of this class

### iterate

    public SequenceIterator iterate(XPathContext context)
                             throws XPathException

  Return an iteration over the sequence

  Parameters:
    `context` - supplies the context for evaluation
  Returns:
    a SequenceIterator that can be used to iterate over the result of the expression
  Throws:
    `XPathException` - if any dynamic error occurs evaluating the expression

### getItemType

    public ItemType getItemType()

  Determine the item type

  Specified by:
    `getItemType` in interface `Expression`
  Overrides:
    `getItemType` in class `SequenceValue`
  Returns:
    AnyItemType (not known)

### getCardinality

    public int getCardinality()

  Determine the static cardinality

  Specified by:
    `getCardinality` in interface `Expression`
  Overrides:
    `getCardinality` in class `SequenceValue`
  Returns:
    one of the values Cardinality.ONE_OR_MORE, Cardinality.ZERO_OR_MORE, Cardinality.EXACTLY_ONE, Cardinality.ZERO_OR_ONE, Cardinality.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:
    `getSpecialProperties` in interface `Expression`
  Overrides:
    `getSpecialProperties` in class `Value`
  Returns:
    zero

### equals

    public boolean equals(java.lang.Object other)

  Is this expression the same as another expression?

  Overrides:
    `equals` in class `SequenceValue`
  Throws:
    `java.lang.ClassCastException` - if the values are not comparable

### hashCode

    public int hashCode()

  Description copied from class: `SequenceValue`
  Return a hash code to support the equals() function

  Overrides:
    `hashCode` in class `SequenceValue`

### effectiveBooleanValue

    public boolean effectiveBooleanValue(XPathContext context)

  Get the effective boolean value - always false

  Specified by:
    `effectiveBooleanValue` in interface `Expression`
  Overrides:
    `effectiveBooleanValue` in class `SequenceValue`
  Parameters:
    `context` - The context in which the expression is to be evaluated
  Returns:
    the effective boolean value

### display

    public void display(int level,
                        NamePool pool,
                        java.io.PrintStream out)

  Diagnostic print of expression structure

  Specified by:
    `display` in interface `Expression`
  Overrides:
    `display` in class `SequenceValue`
  Parameters:
    `level` - indentation level for this expression
    `pool` - NamePool used to expand any names appearing in the expression
    `out` - Output destination