SList

int ro size

The number of Objects in the list


List<Object> asList()

Returns a List of Objects with the same contents as this one.


boolean contains(Object object)

Returns true if object is in this list.


Parameters:
object 


void each(Closure block)

Executes the code in block on each Object in this list.


Parameters:
block 


void forEach(Consumer<Object> action)

Performs the given action for each element of the Iterable until all elements have been processed or the action throws an exception. Unless otherwise specified by the implementing class, actions are performed in the order of iteration (if an iteration order is specified). Exceptions thrown by the action are relayed to the caller.
Implementation Requirements:

The default implementation behaves as if:


     for (T t : this)
         action.accept(t);
 
Parameters:
action - The action to be performed for each element
Throws:
NullPointerException - if the specified action is null
Since:
1.8



Object get(int index)

Returns the Object at index index.


Parameters:
index 


int indexOf(Object object)

Returns the index of object in this list, or -1 if not found.


Parameters:
object 


Iterator<Object> iterator()

Returns an iterator over the Objects in this list.


Spliterator<Object> spliterator()

Creates a Spliterator over the elements described by this Iterable.
Implementation Requirements:
The default implementation creates an early-binding spliterator from the iterable's Iterator. The spliterator inherits the fail-fast properties of the iterable's iterator.
Implementation Note:
The default implementation should usually be overridden. The spliterator returned by the default implementation has poor splitting capabilities, is unsized, and does not report any spliterator characteristics. Implementing classes can nearly always provide a better implementation.
Returns:
a Spliterator over the elements described by this Iterable.
Since:
1.8