Package com.macrofocus.common.collection

# Class Iterables

java.lang.Object
com.macrofocus.common.collection.Iterables

public class Iterables extends Object
Created by luc on 25/11/15.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static interface`
  `Iterables.Condition<T>`
  `static interface`
  `Iterables.Converter<T,C>`
  `static class`
  `Iterables.ToStringConverter`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Iterables()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static <E> Iterable<E>`
  `concatenate(Iterable<? extends E>... iterables)`
  `static <E> Iterable<E>`
  `concatenate(List<Iterable<? extends E>> iterables)`
  `static <T> Iterable<T>`
  `conditional(Iterable<T> original, Iterables.Condition<? super T> condition)`
  `static <T, C> Iterable<C>`
  `convert(Iterable<T> original, Iterables.Converter<? super T,C> converter)`
  `static <T> Iterable<T>`
  `exclude(Iterable<T> original, T value)`
  `static <T> Iterable<T>`
  `forArray(T... array)`
  `static Iterable<Integer>`
  `forIntArray(int... array)`
  `static <E> E[]`
  `makeArray(Iterable<E> iter)`
  `static <E> Collection<E>`
  `makeCollection(Iterable<E> iter)`
  `static <E> List<E>`
  `makeList(Iterable<? extends E> iter)`
  `static <E> E[]`
  `makeTypedArray(Iterable<? extends E> iter, Class<E> type)`
  Copies an iterable's elements into an array.
  `static <T> Iterable<T>`
  `nonNull(Iterable<T> original)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### Iterables

    public Iterables()

- ## Method Details

  - ### forIntArray

    public static Iterable<Integer> forIntArray(int... array)

  - ### forArray

    public static <T> Iterable<T> forArray(T... array)

  - ### exclude

    public static <T> Iterable<T> exclude(Iterable<T> original, T value)

  - ### nonNull

    public static <T> Iterable<T> nonNull(Iterable<T> original)

  - ### conditional

    public static <T> Iterable<T> conditional(Iterable<T> original, Iterables.Condition<? super T> condition)

  - ### convert

    public static <T, C> Iterable<C> convert(Iterable<T> original, Iterables.Converter<? super T,C> converter)

  - ### concatenate

    @SafeVarargs public static <E> Iterable<E> concatenate(Iterable<? extends E>... iterables)

  - ### concatenate

    public static <E> Iterable<E> concatenate(List<Iterable<? extends E>> iterables)

  - ### makeList

    public static <E> List<E> makeList(Iterable<? extends E> iter)

  - ### makeCollection

    public static <E> Collection<E> makeCollection(Iterable<E> iter)

  - ### makeArray

    public static <E> E[] makeArray(Iterable<E> iter)

  - ### makeTypedArray

    @GwtIncompatible public static <E> E[] makeTypedArray(Iterable<? extends E> iter, Class<E> type)
    Copies an iterable's elements into an array. ToDo: This is compatible with Java, not sure about JavaScript
    Parameters:
      `iter` - the iterable to copy
      `type` - the type of the elements
    Returns:
      a newly-allocated array into which all the elements of the iterable have been copied