com.ibm.security.certclient.base

Class PkAttrs.Iter

  1. java.lang.Object
  2. extended bycom.ibm.security.certclient.base.PkAttrs.Iter
All implemented interfaces:
Iterator
Enclosing class:
PkAttrs

  1. public class PkAttrs.Iter
  2. extends Object
  3. implements Iterator
An iterator for the attrs in a PkAttrs collection.

Iter.remove is implemented. Also implements nextAttr to return a PkAttr instead of an Object.


Method Summary

Modifier and Type Method and Description
  1. boolean
hasNext()
Returns true if the iteration has more elements.
  1. Object
next()
Returns the next element in the interation.
  1. PkAttr
nextAttr()
Same as next(), but returns a PkAttr instead of an Object.
  1. void
remove()
Removes from the set of attributes the last attribute returned by the iterator.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

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 Iterator
Returns:
true if the iterator has more elements.

next

  1. public Object next()
Returns the next element in the interation.
Specified by:
next in interface Iterator
Throws:
NoSuchElementException - iteration has no more elements.

nextAttr

  1. public PkAttr nextAttr()
Same as next(), but returns a PkAttr instead of an Object.

remove

  1. public void remove()
Removes from the set of attributes the last attribute returned by the iterator. This method can be called only once per call to next. The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method.
Specified by:
remove in interface Iterator
Throws:
IllegalStateException - if the next method has not yet been called.