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

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT 
    • Constructor Summary

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

      Methods 
      Modifier and Type Method and Description
      boolean hasNext()
      Returns true if the iteration has more elements.
      E next()
      Returns the next element in the iteration.
      void remove()
      Unsupported method.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • UnmodifiableIterator

        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

        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>
IBM Business Process ManagerTM
Release 8