Interface XGettingSequence<E>

    • Method Detail

      • copy

        XGettingSequence<E> copy()
        Creates a true copy of this list which references th same elements in the same order as this list does at the time the method is called. The elements themselves are NOT copied (no deep copying).
        The type of the returned list is the same as of this list if possible (i.e.: a SubList can not meaningful return a true copy that references its elements but still is a SubList)
        Specified by:
        copy in interface Copyable
        Specified by:
        copy in interface XGettingCollection<E>
        Returns:
        a copy of this list
      • immure

        XImmutableSequence<E> immure()
        Provides an instance of an immutable collection type with equal behavior and data as this instance.

        If this instance already is of an immutable collection type, it returns itself.

        Specified by:
        immure in interface XGettingCollection<E>
        Returns:
        an immutable copy of this collection instance.
      • hasIndex

        default boolean hasIndex​(long index)
        Equivalent to "contains index". Compare: XGettingTable table with table.keys().contains(index)
        Parameters:
        index -
        Returns:
        true if the passed index is greater or equal to 0,XGettingCollection.size() is greater than the passed index and at(long) returns a non-null value.
      • poll

        E poll()
      • peek

        E peek()
      • maxIndex

        long maxIndex​(Comparator<? super E> comparator)
      • minIndex

        long minIndex​(Comparator<? super E> comparator)
      • indexOf

        long indexOf​(E element)
      • indexBy

        long indexBy​(Predicate<? super E> predicate)
      • lastIndexOf

        long lastIndexOf​(E element)
      • lastIndexBy

        long lastIndexBy​(Predicate<? super E> predicate)
      • scan

        long scan​(Predicate<? super E> predicate)
        Iterates through the collection and returns the index of the last element that the passed Predicateapplied to ("scanning").
        Parameters:
        predicate -
        Returns:
        the index of the last positively tested element.
      • isSorted

        boolean isSorted​(Comparator<? super E> comparator)
      • copySelection

        <T extends Consumer<? super E>> T copySelection​(T target,
                                                        long... indices)