Package 

Class CursorList

  • All Implemented Interfaces:
    kotlin.collections.Collection , kotlin.collections.Iterable , kotlin.collections.List

    
    public final class CursorList<E extends Object>
     implements List<E>
                        

    A List with a mutable cursor index.

    next and previous refer to the last element returned by a previous call to any of both methods.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private final Integer size
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final Boolean hasPrevious()
      final E previous() Moves the cursor backward and returns the element, or null when reaching the beginning.
      final Boolean hasNext()
      final E next() Moves the cursor forward and returns the element, or null when reaching the end.
      • Methods inherited from class kotlin.collections.List

        contains, containsAll, get, getSize, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, spliterator, subList
      • Methods inherited from class kotlin.collections.Iterable

        forEach
      • Methods inherited from class kotlin.collections.Collection

        parallelStream, stream, toArray
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CursorList

        CursorList(List<E> list, Integer index)
        Parameters:
        list - the content of the CursorList
        index - the index of the element that will initially be considered as the last returned element.
    • Method Detail

      • previous

         final E previous()

        Moves the cursor backward and returns the element, or null when reaching the beginning.

      • next

         final E next()

        Moves the cursor forward and returns the element, or null when reaching the end.