public abstract class Iterations extends Object
| Constructor and Description |
|---|
Iterations() |
| Modifier and Type | Method and Description |
|---|---|
static <T> Iterable<T> |
iterable()
Creates an empty iterable.
|
static <T> Iterable<T> |
iterable(T... values)
Creates an iterable from the passed array.
|
static <T> Iterable<T> |
iterable(T value)
Creates an iterable from the passed value.
|
static <T> Iterable<T> |
iterable(T first,
T second)
Creates an iterable from the passed values.
|
static <T> Iterable<T> |
iterable(T first,
T second,
T third)
Creates an iterable from the passed values.
|
static <T> Iterator<T> |
iterator()
Creates an empty iterator
|
static <T> Iterator<T> |
iterator(T... values)
Creates an iterator from the passed array.
|
static <T> Iterator<T> |
iterator(T value)
Creates an iterator from the passed value.
|
static <T> Iterator<T> |
iterator(T first,
T second)
Creates an iterator from the passed values.
|
static <T> Iterator<T> |
iterator(T first,
T second,
T third)
Creates an iterator from the passed values.
|
static <T> Iterable<T> |
oneTime(Iterator<T> iterator)
Creates an iterable usable only ONE TIME from an iterator.
|
public static <T> Iterable<T> oneTime(Iterator<T> iterator)
T - the iterator element type parameteriterator - the iterator to be yielded by the iterablepublic static <T> Iterator<T> iterator()
T - the element parameter typepublic static <T> Iterator<T> iterator(T value)
T - the element parameter typevalue - the value to be yielded by the iteratorpublic static <T> Iterator<T> iterator(T first, T second)
T - the elements parameter typefirst - the first elementsecond - the second elementpublic static <T> Iterator<T> iterator(T first, T second, T third)
T - the elements parameter typefirst - the first elementsecond - the second elementthird - the third elementpublic static <T> Iterator<T> iterator(T... values)
T - the array element parameter typevalues - the values to be yielded by the iteratorpublic static <T> Iterable<T> iterable()
T - the element parameter typepublic static <T> Iterable<T> iterable(T value)
T - the element parameter typevalue - the value to be yielded by the iteratorpublic static <T> Iterable<T> iterable(T first, T second)
T - the elements parameter typefirst - the first elementsecond - the second elementpublic static <T> Iterable<T> iterable(T first, T second, T third)
T - the elements parameter typefirst - the first elementsecond - the second elementthird - the third elementpublic static <T> Iterable<T> iterable(T... values)
T - the array element parameter typevalues - the values to be yielded by the iteratorCopyright © 2017. All rights reserved.