Class LazyWrappingIterable<E,W>

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

public abstract class LazyWrappingIterable<E,W> extends Object implements IterableWithSize<W>
The iterator never returns null values
Since:
3.9.0
  • Constructor Details

    • LazyWrappingIterable

      public LazyWrappingIterable(@NotNull StrictList<E> elements)
    • LazyWrappingIterable

      public LazyWrappingIterable(@NotNull IterableWithSize<E> elements)
      Since:
      3.17.2
  • Method Details

    • iterator

      public final Iterator<W> iterator()
      Specified by:
      iterator in interface Iterable<E>
    • 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 W> collection)
      Specified by:
      addAllTo in interface IterableWithSize<E>
    • toArrayList

      @NotNull public final ArrayList<W> 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 W[] toArray(@NotNull W[] 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