com.evanmclean.evlib.lang
Class UnmodifiableIterable<T>

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

Constructor Summary
UnmodifiableIterable(Iterable<T> iterable)
           
 
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

UnmodifiableIterable

public UnmodifiableIterable(Iterable<T> iterable)
Method Detail

iterator

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