com.evanmclean.evlib.lang
Class UnmodifiableIterable<T>
java.lang.Object
com.evanmclean.evlib.lang.UnmodifiableIterable<T>
- Type Parameters:
T -
- All Implemented Interfaces:
- Iterable<T>
public class UnmodifiableIterable<T>
- extends Object
- implements Iterable<T>
Wrapper around an Iterable that will produce an Iterator that
will always throw an UnsupportedOperationException if
Iterator.remove() is called.
- Author:
- Evan McLean McLean Computer Services (see the
overview for copyright and licensing.)
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UnmodifiableIterable
public UnmodifiableIterable(Iterable<T> iterable)
iterator
public Iterator<T> iterator()
- Specified by:
iterator in interface Iterable<T>