Build 1.0_r1(from source)

org.apache.http.message
Class BasicHeaderElementIterator

java.lang.Object
  extended by org.apache.http.message.BasicHeaderElementIterator
All Implemented Interfaces:
Iterator, HeaderElementIterator

public class BasicHeaderElementIterator
extends Object
implements HeaderElementIterator

Basic implementation of a HeaderElementIterator.


Constructor Summary
BasicHeaderElementIterator(HeaderIterator headerIterator)
           
BasicHeaderElementIterator(HeaderIterator headerIterator, HeaderValueParser parser)
          Creates a new instance of BasicHeaderElementIterator
 
Method Summary
 boolean hasNext()
          Indicates whether there is another header element in this iteration.
 Object next()
          Returns the next object in the iteration.
 HeaderElement nextElement()
          Obtains the next header element from this iteration.
 void remove()
          Removes the last object returned by next from the collection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicHeaderElementIterator

public BasicHeaderElementIterator(HeaderIterator headerIterator,
                                  HeaderValueParser parser)
Creates a new instance of BasicHeaderElementIterator


BasicHeaderElementIterator

public BasicHeaderElementIterator(HeaderIterator headerIterator)
Method Detail

hasNext

public boolean hasNext()
Description copied from interface: HeaderElementIterator
Indicates whether there is another header element in this iteration.

Specified by:
hasNext in interface Iterator
Specified by:
hasNext in interface HeaderElementIterator
Returns:
true if there is another header element, false otherwise
See Also:
Iterator.next()

nextElement

public HeaderElement nextElement()
                          throws NoSuchElementException
Description copied from interface: HeaderElementIterator
Obtains the next header element from this iteration. This method should only be called while hasNext is true.

Specified by:
nextElement in interface HeaderElementIterator
Returns:
the next header element in this iteration
Throws:
NoSuchElementException

next

public final Object next()
                  throws NoSuchElementException
Description copied from interface: Iterator
Returns the next object in the iteration.

Specified by:
next in interface Iterator
Returns:
the next object
Throws:
NoSuchElementException - when there are no more elements
See Also:
Iterator.hasNext()

remove

public void remove()
            throws UnsupportedOperationException
Description copied from interface: Iterator
Removes the last object returned by next from the collection.

Specified by:
remove in interface Iterator
Throws:
UnsupportedOperationException - when removing is not supported by the collection being iterated

Build 1.0_r1(from source)

Please submit a feedback, bug or feature