Class DelegatingIterableWithSize<E>
java.lang.Object
com.polarion.alm.shared.api.utils.collections.DelegatingIterableWithSize<E>
- All Implemented Interfaces:
IterableWithSize<E>,Iterable<E>
- Since:
- 3.9.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidaddAllTo(Collection<? super E> collection) final booleanisEmpty()iterator()final intsize()final E[]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
-
DelegatingIterableWithSize
public DelegatingIterableWithSize()
-
-
Method Details
-
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
-
iterator
-