## com.saxonica.deploy
Class Tail

    java.lang.Object
      net.sf.saxon.value.Value
          com.saxonica.deploy.Tail

All Implemented Interfaces:
  java.io.Serializable, SequenceIterable, ValueRepresentation

    public final class Tail

extends Value

A sequence value implemented as the trailing part of an underlying value

This class is currently used only in compiled queries

See Also:
  Serialized Form

Field Summary

Fields inherited from class net.sf.saxon.value.Value
`EMPTY_CLASS_ARRAY, INDETERMINATE_ORDERING`

Fields inherited from interface net.sf.saxon.om.ValueRepresentation
`EMPTY_VALUE_ARRAY`

Method Summary
`int` `getCardinality()` Determine the cardinality
`ItemType` `getItemType(TypeHierarchy th)` Get the (lowest common) item type.
`int` `getLength()` Get the number of items in the sequence
`java.lang.Comparable` `getSchemaComparable()` Get a Comparable value that implements the XML Schema ordering comparison semantics for this value.
`Item` `itemAt(int n)` Get the n'th item in the sequence (starting with 0 as the first item)
`SequenceIterator` `iterate()` Return an iterator over this sequence.
`static Value` `make(Value value, int start)` Static factory method
`Value` `reduce()` Reduce a value to its simplest form.

Methods inherited from class net.sf.saxon.value.Value
`asItem, asItem, asIterator, asValue, checkPermittedContents, convertToJava, effectiveBooleanValue, equals, fromItem, getCanonicalLexicalRepresentation, getIterator, getStringValue, getStringValueCS, iterate, makeQNameValue, process, stringToNumber, toString`

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

Method Detail

### make

    public static Value make(Value value,
                             int start)

  Static factory method

  Parameters:
    `value` - The underlying value
    `start` - zero-based offset of the first item to be included
  Returns:
    the constructed value

### reduce

    public Value reduce()
                 throws XPathException

  Reduce a value to its simplest form. If the value is a closure or some other form of deferred value such as a FunctionCallPackage, then it is reduced to a SequenceExtent. If it is a SequenceExtent containing a single item, then it is reduced to that item. One consequence that is exploited by class FilterExpression is that if the value is a singleton numeric value, then the result will be an instance of NumericValue

  Overrides:
    `reduce` in class `Value`
  Returns:
    the value in simplified form
  Throws:
    `XPathException`

### getLength

    public int getLength()
                  throws XPathException

  Get the number of items in the sequence

  Overrides:
    `getLength` in class `Value`
  Returns:
    the number of items in the sequence
  Throws:
    `XPathException`

### getCardinality

    public int getCardinality()

  Determine the cardinality

  Overrides:
    `getCardinality` in class `Value`
  Returns:
    the cardinality of the sequence, using the constants defined in net.sf.saxon.value.Cardinality
  See Also:
    `Cardinality`

### getItemType

    public ItemType getItemType(TypeHierarchy th)

  Get the (lowest common) item type. This implementation simply returns the ItemType of the underlying sequence, even though the items included in the tail might belong to a narrower type

  Overrides:
    `getItemType` in class `Value`
  Parameters:
    `th` - the type hierarchy cache
  Returns:
    ItemType identifying an item type to which all the items in this sequence conform

### itemAt

    public Item itemAt(int n)
                throws XPathException

  Get the n'th item in the sequence (starting with 0 as the first item)

  Overrides:
    `itemAt` in class `Value`
  Parameters:
    `n` - the position of the required item
  Returns:
    the n'th item in the sequence
  Throws:
    `XPathException`

### iterate

    public SequenceIterator iterate()
                             throws XPathException

  Return an iterator over this sequence.

  Specified by:
    `iterate` in class `Value`
  Returns:
    the required SequenceIterator, positioned at the start of the sequence
  Throws:
    `XPathException` - if a dynamic error occurs. This is possible only in the case of values that are materialized lazily, that is, where the iterate() method leads to computation of an expression that delivers the values.

### getSchemaComparable

    public java.lang.Comparable getSchemaComparable()

  Get a Comparable value that implements the XML Schema ordering comparison semantics for this value. The default implementation returns "this", which ensures that comparisons between list values are handled by the equals() and compareTo() methods on this class itself. This is overridden for atomic values.

  In the case of data types that are partially ordered, the returned Comparable extends the standard semantics of the compareTo() method by returning the value `Value.INDETERMINATE_ORDERING` when there is no defined order relationship between two given values.

  Overrides:
    `getSchemaComparable` in class `Value`
  Returns:
    a Comparable that follows XML Schema comparison rules

Copyright (c) Saxonica Limited. All rights reserved.