public class

IterableAdapter

extends Object
java.lang.Object
   ↳ com.google.gwt.benchmarks.client.impl.IterableAdapter

Class Overview

Provides convenience methods for adapting various values to the Iterable interface.

Summary

Public Constructors
IterableAdapter()
Public Methods
static <T> Iterable<T> toIterable(T[] array)
Returns an Iterable from an array.
static <T> Iterable<T> toIterable(Iterable<T> iterable)
Returns iterable as itself.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public IterableAdapter ()

Public Methods

public static Iterable<T> toIterable (T[] array)

Returns an Iterable from an array.

Parameters
array a not null array
Returns
  • an Iterable that wraps the array

public static Iterable<T> toIterable (Iterable<T> iterable)

Returns iterable as itself. Useful for code-gen situations.

Parameters
iterable a maybe null Iterable
Returns
  • iterable