net.sf.saxon.value

Class EmptySequence

public final class EmptySequence extends Value

An EmptySequence object represents a sequence containing no members.
Method Summary
voiddisplay(int level, NamePool pool, PrintStream out)
Diagnostic print of expression structure
booleaneffectiveBooleanValue(XPathContext context)
Get the effective boolean value - always false
booleanequals(Object other)
Is this expression the same as another expression?
intgetCardinality()
Determine the static cardinality
intgetImplementationMethod()
An implementation of Expression must provide at least one of the methods evaluateItem(), iterate(), or process().
static EmptySequencegetInstance()
Get the implicit instance of this class
ItemTypegetItemType(TypeHierarchy th)
Determine the item type
intgetLength()
Get the length of the sequence
intgetSpecialProperties()
Get the static properties of this expression (other than its type).
inthashCode()
SequenceIteratoriterate(XPathContext context)
Return an iteration over the sequence

Method Detail

display

public void display(int level, NamePool pool, PrintStream out)
Diagnostic print of expression structure

effectiveBooleanValue

public boolean effectiveBooleanValue(XPathContext context)
Get the effective boolean value - always false

equals

public boolean equals(Object other)
Is this expression the same as another expression?

Throws: ClassCastException if the values are not comparable

getCardinality

public int getCardinality()
Determine the static cardinality

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.

getInstance

public static EmptySequence getInstance()
Get the implicit instance of this class

getItemType

public ItemType getItemType(TypeHierarchy th)
Determine the item type

Parameters: th

getLength

public final int getLength()
Get the length of the sequence

Returns: always 0 for an empty sequence

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.

hashCode

public int hashCode()

iterate

public SequenceIterator iterate(XPathContext context)
Return an iteration over the sequence