com.levigo.util.base.collections
Class SingletonIterable<T>
java.lang.Object
com.levigo.util.base.collections.SingletonIterable<T>
- Type Parameters:
T
-
- All Implemented Interfaces:
- Iterable<T>
public class SingletonIterable<T>
- extends Object
- implements Iterable<T>
A Iterable
implementation that will contain only one single element. This class is just a
Iterable
wrapper around SingletonIterator
.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SingletonIterable
public SingletonIterable(T element)
iterator
public Iterator<T> iterator()
- Specified by:
iterator
in interface Iterable<T>
Copyright © 1995-2020 levigo holding gmbh. All Rights Reserved.