com.ibm.wbiserver.brules.mgmt

Class UnmodifiableIterator<E>

  1. java.lang.Object
  2. extended bycom.ibm.wbiserver.brules.mgmt.UnmodifiableIterator<E>
Type Parameters:
E - The type of object returned by the iterator.
All implemented interfaces:
java.util.Iterator<E>

  1. public class UnmodifiableIterator<E>
  2. extends java.lang.Object
  3. implements java.util.Iterator<E>
This class implements an unmodifiable iterator based on another iterator. The remove method from the Iterator interface is not supported and will throw an UnsupportedOperationException if called.

Field Summary

Modifier and Type Field and Description
  1. static
  2. java.lang.String
COPYRIGHT

Constructor Summary

Constructor and Description
UnmodifiableIterator(java.util.Iterator<E> iter)
Constructor for UnmodifiableIterator class.

Method Summary

Modifier and Type Method and Description
  1. boolean
hasNext()
Returns true if the iteration has more elements.
  1. E
next()
Returns the next element in the iteration.
  1. void
remove()
Unsupported method.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

  1. public static final java.lang.String COPYRIGHT
See Also:

Constructor Detail

UnmodifiableIterator

  1. public UnmodifiableIterator(java.util.Iterator<E> iter)
Constructor for UnmodifiableIterator class.
Parameters:
iter - The Iterator that this object is to be based on.

Method Detail

hasNext

  1. 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

  1. 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

  1. public void remove()
Unsupported method. Throws an UnsupportedOperationException if called.
Specified by:
remove in interface java.util.Iterator<E>