Class FltSeq

  • All Implemented Interfaces:
    Iterable<Item>

    public final class FltSeq
    extends Seq
    Sequence of items of type xs:float, containing at least two of them.
    Author:
    BaseX Team 2005-24, BSD License, Christian Gruen
    • Method Detail

      • write

        public void write​(DataOutput out)
                   throws IOException
        Description copied from class: Value
        Writes the data structure to disk.
        Overrides:
        write in class Value
        Parameters:
        out - data output
        Throws:
        IOException - I/O exception
      • itemAt

        public Flt itemAt​(long pos)
        Description copied from class: Value
        Returns the item at the given position in the value. The specified value must be lie within the valid bounds.
        Specified by:
        itemAt in class Value
        Parameters:
        pos - position
        Returns:
        item
      • reverse

        public Value reverse​(QueryContext qc)
        Description copied from class: Value
        Returns all items of this value in reverse order.
        Specified by:
        reverse in class Value
        Parameters:
        qc - query context
        Returns:
        items in reverse order
      • toJava

        public float[] toJava()
        Description copied from class: Value
        Returns a Java representation of the value.
        Overrides:
        toJava in class Seq
        Returns:
        Java object
      • get

        public static Value get​(float[] values)
        Creates a sequence with the specified values.
        Parameters:
        values - values
        Returns:
        value
      • get

        public static Value get​(long size,
                                Value... values)
                         throws QueryException
        Creates a typed sequence with the items of the specified values.
        Parameters:
        size - size of resulting sequence
        values - values
        Returns:
        value
        Throws:
        QueryException - query exception
      • cache

        public final void cache​(boolean lazy,
                                InputInfo ii)
        Description copied from class: Value
        Caches data of lazy items (i.e., those implementing the Lazy interface). By calling this method, the streaming feature of lazy items will be disabled.
        Overrides:
        cache in class Seq
        Parameters:
        lazy - if false, cache immediately. if true, caching is deferred until the data is actually requested
        ii - input info (can be null)
      • atomValue

        public Value atomValue​(QueryContext qc,
                               InputInfo ii)
        Description copied from class: Expr
        Evaluates the expression and returns the atomized items.
        Overrides:
        atomValue in class Seq
        Parameters:
        qc - query context
        ii - input info (can be null); required for those Value instances that have no input info)
        Returns:
        atomized item
      • sameType

        public final boolean sameType()
        Description copied from class: Value
        Checks if all items of the sequence are of the same type.
        Overrides:
        sameType in class Seq
        Returns:
        result of check
      • insertBefore

        public final Value insertBefore​(long pos,
                                        Item item,
                                        QueryContext qc)
        Inserts an item at the given position into this sequence and returns the resulting sequence. Because this function will mostly be invoked recursively, the standard implementation will be called, because its runtime outweighs the possibly higher memory consumption.
        Specified by:
        insertBefore in class Seq
        Parameters:
        pos - position at which the item should be inserted, must be between 0 and Seq.size
        item - item to insert
        qc - query context
        Returns:
        resulting value
      • remove

        public final Value remove​(long pos,
                                  QueryContext qc)
        Removes the item at the given position in this sequence and returns the resulting sequence. Because this function will mostly be invoked recursively, the standard implementation will be called, because its runtime outweighs the possibly higher memory consumption.
        Specified by:
        remove in class Seq
        Parameters:
        pos - position of the item to remove, must be between 0 and Seq.size - 1
        qc - query context
        Returns:
        resulting sequence
      • refineType

        public void refineType()
        Description copied from class: Value
        Computes a more precise sequence type of this value.
        Overrides:
        refineType in class Value