Class DelegatingIterableWithSize<E>

java.lang.Object
com.polarion.alm.shared.api.utils.collections.DelegatingIterableWithSize<E>
All Implemented Interfaces:
IterableWithSize<E>, Iterable<E>

public abstract class DelegatingIterableWithSize<E> extends Object implements IterableWithSize<E>
Since:
3.9.0
  • Constructor Details

    • DelegatingIterableWithSize

      public DelegatingIterableWithSize()
  • Method Details

    • size

      public final int size()
      Specified by:
      size in interface IterableWithSize<E>
    • isEmpty

      public final boolean isEmpty()
      Specified by:
      isEmpty in interface IterableWithSize<E>
    • addAllTo

      public final void addAllTo(@NotNull Collection<? super E> collection)
      Specified by:
      addAllTo in interface IterableWithSize<E>
    • toArrayList

      @NotNull public final ArrayList<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 interface IterableWithSize<E>
    • toArray

      @NotNull public final E[] toArray(@NotNull E[] a)
      Description copied from interface: IterableWithSize
      Iterating over array is faster, when checking for concurrent modification is not needed.
      Specified by:
      toArray in interface IterableWithSize<E>
      Parameters:
      a - - must have exactly the same size as the collection
    • iterator

      public final Iterator<E> iterator()
      Specified by:
      iterator in interface Iterable<E>