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 voidaddAllTo(Collection<? super W> collection) final booleanisEmpty()iterator()final intsize()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, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
Method Details
-
iterator
-
size
public final int size()- Specified by:
sizein interfaceIterableWithSize<E>
-
isEmpty
public final boolean isEmpty()- Specified by:
isEmptyin interfaceIterableWithSize<E>
-
addAllTo
- Specified by:
addAllToin interfaceIterableWithSize<E>
-
toArrayList
Description copied from interface:IterableWithSizeReturns new ArrayList containing the same elements, so modifying the returned list does not modify the original collection.- Specified by:
toArrayListin interfaceIterableWithSize<E>
-
toArray
Description copied from interface:IterableWithSizeIterating over array is faster, when checking for concurrent modification is not needed.- Specified by:
toArrayin interfaceIterableWithSize<E>- Parameters:
a- - must have exactly the same size as the collection
-