com.levigo.util.base.collections
Class SingletonIterable<T>

java.lang.Object
  extended by 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.


Constructor Summary
SingletonIterable(T element)
           
 
Method Summary
 Iterator<T> iterator()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingletonIterable

public SingletonIterable(T element)
Method Detail

iterator

public Iterator<T> iterator()
Specified by:
iterator in interface Iterable<T>


Copyright © 1995-2020 levigo holding gmbh. All Rights Reserved.