com.google.gwt.benchmarks.client.impl
Class IterableAdapter

java.lang.Object
  extended by com.google.gwt.benchmarks.client.impl.IterableAdapter

public class IterableAdapter
extends java.lang.Object

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


Constructor Summary
IterableAdapter()
           
 
Method Summary
static
<T> java.lang.Iterable<T>
toIterable(java.lang.Iterable<T> iterable)
          Returns iterable as itself.
static
<T> java.lang.Iterable<T>
toIterable(T[] array)
          Returns an Iterable from an array.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IterableAdapter

public IterableAdapter()
Method Detail

toIterable

public static <T> java.lang.Iterable<T> toIterable(T[] array)
Returns an Iterable from an array.

Parameters:
array - a not null array
Returns:
an Iterable that wraps the array

toIterable

public static <T> java.lang.Iterable<T> toIterable(java.lang.Iterable<T> iterable)
Returns iterable as itself. Useful for code-gen situations.

Parameters:
iterable - a maybe null Iterable
Returns:
iterable