Class EmptySequence

    • Method Detail

      • getInstance

        public static EmptySequence 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

        public SequenceIterator iterate​(XPathContext context)
        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
      • 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:
        StaticProperty.NON_CREATIVE
      • getLength

        public final int getLength()
        Get the length of the sequence
        Overrides:
        getLength in class Value
        Returns:
        always 0 for an empty sequence
      • equals

        public boolean equals​(java.lang.Object other)
        Is this expression the same as another expression?
        Overrides:
        equals in class Value
        Throws:
        java.lang.ClassCastException - if the values are not comparable
      • hashCode

        public int hashCode()
        Description copied from class: Value
        Return a hash code to support the equals() function
        Overrides:
        hashCode in class Value
      • effectiveBooleanValue

        public boolean effectiveBooleanValue​(XPathContext context)
        Get the effective boolean value - always false
        Specified by:
        effectiveBooleanValue in interface Expression
        Overrides:
        effectiveBooleanValue in class Value
        Parameters:
        context - The context in which the expression is to be evaluated
        Returns:
        the effective boolean value
      • display

        public void display​(int level,
                            java.io.PrintStream out,
                            Configuration config)
        Diagnostic print of expression structure
        Specified by:
        display in interface Expression
        Overrides:
        display in class Value
        Parameters:
        level - indentation level for this expression
        out - Output destination