de.espirit.common.util
Interface Listable<T>

Type Parameters:
T - The type of store elements.
All Superinterfaces:
Iterable<T>

public interface Listable<T>
extends Iterable<T>

An iterable on store elements that enables to transform the iterable into a list.

Since:
4.0

Method Summary
 T getFirst()
          Get the first element provided by this listable.
 List<T> toList()
          Creates a new, mutable list containing all elements.
 
Methods inherited from interface java.lang.Iterable
iterator
 

Method Detail

getFirst

@Nullable
T getFirst()
Get the first element provided by this listable.

Returns:
The first element or null, if empty.
Since:
4.0

toList

@NotNull
List<T> toList()
Creates a new, mutable list containing all elements.
Attention: Avoid using this method for iterative usage patterns. Use methods of Iterable instead.

Returns:
A new list on elements.
Since:
4.0


Copyright © 2012 e-Spirit AG. All Rights Reserved. Build 4.2.480