gnu.javax.net.ssl.provider

Class ExtensionList.ExtensionsIterator

Enclosing Class:
ExtensionList
Implemented Interfaces:
Iterator<E>, ListIterator<E>

public final class ExtensionList.ExtensionsIterator
extends Object
implements ListIterator<E>

List iterator interface to an extensions list.

Constructor Summary

ExtensionsIterator()
The basic constructor.

Method Summary

void
add(Extension e)
boolean
hasNext()
Tests whether there are elements remaining in the collection.
boolean
hasPrevious()
Extension
next()
Obtain the next element in the collection.
int
nextIndex()
Extension
previous()
int
previousIndex()
void
remove()
Remove from the underlying collection the last element returned by next (optional operation).
void
set(Extension e)

Methods inherited from class java.lang.Object

clone, equals, extends Object> getClass, finalize, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Details

ExtensionsIterator

public ExtensionsIterator()
The basic constructor. Object is special, because it has no superclass, so there is no call to super().

Method Details

add

public void add(Extension e)

hasNext

public boolean hasNext()
Tests whether there are elements remaining in the collection. In other words, calling next() will not throw an exception.
Specified by:
hasNext in interface ListIterator<E>
hasNext in interface Iterator<E>
Returns:
true if there is at least one more element in the collection

hasPrevious

public boolean hasPrevious()
Specified by:
hasPrevious in interface ListIterator<E>

next

public Extension next()
            throws NoSuchElementException
Obtain the next element in the collection.
Specified by:
next in interface ListIterator<E>
next in interface Iterator<E>
Returns:
the next element in the collection
Throws:
NoSuchElementException - if there are no more elements

nextIndex

public int nextIndex()
Specified by:
nextIndex in interface ListIterator<E>

previous

public Extension previous()
            throws NoSuchElementException
Specified by:
previous in interface ListIterator<E>

previousIndex

public int previousIndex()
Specified by:
previousIndex in interface ListIterator<E>

remove

public void remove()
Remove from the underlying collection the last element returned by next (optional operation). This method can be called only once after each call to next(). It does not affect what will be returned by subsequent calls to next.
Specified by:
remove in interface ListIterator<E>
remove in interface Iterator<E>
Throws:
IllegalStateException - if next has not yet been called or remove has already been called since the last call to next.
UnsupportedOperationException - if this Iterator does not support the remove operation.

set

public void set(Extension e)