Interface RList<V>

    • Method Detail

      • get

        List<V> get​(int... indexes)
        Loads elements by specified indexes
        Parameters:
        indexes - of elements
        Returns:
        list of elements
      • mapReduce

        <KOut,​VOut> RCollectionMapReduce<V,​KOut,​VOut> mapReduce()
        Returns RMapReduce object associated with this map
        Type Parameters:
        KOut - output key
        VOut - output value
        Returns:
        MapReduce instance
      • addAfter

        int addAfter​(V elementToFind,
                     V element)
        Add element after elementToFind
        Parameters:
        elementToFind - - object to find
        element - - object to add
        Returns:
        new list size
      • addBefore

        int addBefore​(V elementToFind,
                      V element)
        Add element before elementToFind
        Parameters:
        elementToFind - - object to find
        element - - object to add
        Returns:
        new list size
      • fastSet

        void fastSet​(int index,
                     V element)
        Set element at index. Works faster than List.set(int, Object) but doesn't return previous element.
        Parameters:
        index - - index of object
        element - - object to set
      • subList

        RList<V> subList​(int fromIndex,
                         int toIndex)
        Specified by:
        subList in interface List<V>
      • readAll

        List<V> readAll()
        Read all elements at once
        Returns:
        list of values
      • trim

        void trim​(int fromIndex,
                  int toIndex)
        Trim list and remains elements only in specified range fromIndex, inclusive, and toIndex, inclusive.
        Parameters:
        fromIndex - - from index
        toIndex - - to index
      • range

        List<V> range​(int toIndex)
        Returns range of values from 0 index to toIndex. Indexes are zero based. -1 means the last element, -2 means penultimate and so on.
        Parameters:
        toIndex - - end index
        Returns:
        elements
      • range

        List<V> range​(int fromIndex,
                      int toIndex)
        Returns range of values from fromIndex to toIndex index including. Indexes are zero based. -1 means the last element, -2 means penultimate and so on.
        Parameters:
        fromIndex - - start index
        toIndex - - end index
        Returns:
        elements
      • fastRemove

        void fastRemove​(int index)
        Remove object by specified index
        Parameters:
        index - - index of object
      • remove

        boolean remove​(Object element,
                       int count)
        Removes up to count occurrences of element
        Parameters:
        element - - element to find
        count - - amount occurrences
        Returns:
        true if at least one element removed; or false if element isn't found