Package eu.bandm.tools.util.java
Interface Iterables.Cached<A>
- Type Parameters:
A
- the element type
- All Superinterfaces:
Collection<A>
,Iterable<A>
,List<A>
,SequencedCollection<A>
- Enclosing class:
Iterables
A list that is populated lazily on demand.
-
Method Summary
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.List
add, add, addAll, addAll, addFirst, addLast, clear, contains, containsAll, equals, get, getFirst, getLast, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeFirst, removeLast, replaceAll, retainAll, reversed, set, size, sort, spliterator, subList, toArray, toArray
-
Method Details
-
source
Returns the source from which this list is populated.- Returns:
- the source from which this list is populated
-
force
Populates this list completely, and returns an efficient view.If this list is already populated completely, nothing happens.
- Returns:
- an unmodifiable view on this list with efficient access
- See Also:
-
isComplete
boolean isComplete()Checks whether this list has been completely populated.A positive result can be due to a preceding call to
force()
, due to iterating the list exhaustively, or due to a whole-list operation such asList.size()
.- Returns:
true
if this list is completely populated;false
if there are elements left to draw from the source on demand- See Also:
-