Class LazyWrappingIterable<E,W>
java.lang.Object
com.polarion.alm.shared.api.utils.collections.LazyWrappingIterable<E,W>
- All Implemented Interfaces:
IterableWithSize<W>
,Iterable<W>
The iterator never returns null values
- Since:
- 3.9.0
-
Constructor Summary
ConstructorsConstructorDescriptionLazyWrappingIterable
(IterableWithSize<E> elements) LazyWrappingIterable
(StrictList<E> elements) -
Method Summary
Modifier and TypeMethodDescriptionfinal void
addAllTo
(Collection<? super W> collection) final boolean
isEmpty()
iterator()
final int
size()
final W[]
Iterating over array is faster, when checking for concurrent modification is not needed.Returns new ArrayList containing the same elements, so modifying the returned list does not modify the original collection.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
Method Details
-
iterator
-
size
public final int size()- Specified by:
size
in interfaceIterableWithSize<E>
-
isEmpty
public final boolean isEmpty()- Specified by:
isEmpty
in interfaceIterableWithSize<E>
-
addAllTo
- Specified by:
addAllTo
in interfaceIterableWithSize<E>
-
toArrayList
Description copied from interface:IterableWithSize
Returns new ArrayList containing the same elements, so modifying the returned list does not modify the original collection.- Specified by:
toArrayList
in interfaceIterableWithSize<E>
-
toArray
Description copied from interface:IterableWithSize
Iterating over array is faster, when checking for concurrent modification is not needed.- Specified by:
toArray
in interfaceIterableWithSize<E>
- Parameters:
a
- - must have exactly the same size as the collection
-