com.ibm.wbiserver.brules.mgmt
Class UnmodifiableIterator<E>
- java.lang.Object
com.ibm.wbiserver.brules.mgmt.UnmodifiableIterator<E>
Type Parameters:
E
- The type of object returned by the iterator.
All implemented interfaces:
java.util.Iterator<E>
- public class UnmodifiableIterator<E>
- extends java.lang.Object
- implements java.util.Iterator<E>
remove
method from the Iterator
interface is not supported and
will throw an UnsupportedOperationException
if called.
Field Summary
Modifier and Type | Field and Description |
---|---|
|
COPYRIGHT
|
Constructor Summary
Constructor and Description |
---|
UnmodifiableIterator(java.util.Iterator<E> iter)
Constructor for
UnmodifiableIterator class.
|
Method Summary
Modifier and Type | Method and Description |
---|---|
|
hasNext()
Returns true if the iteration has more elements.
|
next()
Returns the next element in the iteration.
|
|
|
remove()
Unsupported method.
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail
COPYRIGHT
- public static final java.lang.String COPYRIGHT
See Also:
Constructor Detail
UnmodifiableIterator
- public UnmodifiableIterator(java.util.Iterator<E> iter)
Parameters:
iter
- The Iterator
that this object is to be based on. Method Detail
hasNext
- public boolean hasNext()
Returns true if the iteration has more elements. (In other words, returns true if next
would return an element rather than throwing an exception.)
Specified by:
hasNext
in interface java.util.Iterator<E>
Returns:
true if the iterator has more elements.
next
- public E next()
Returns the next element in the iteration. Calling this method repeatedly until the
hasNext()
method returns false will return each element in the underlying
collection exactly once.
Specified by:
next
in interface java.util.Iterator<E>
Returns:
The next element in the iteration.
remove
- public void remove()
Unsupported method. Throws an
UnsupportedOperationException
if called.
Specified by:
remove
in interface java.util.Iterator<E>
UnmodifiableIterator
class.