public class

BasicHeaderElementIterator

extends Object
implements HeaderElementIterator
java.lang.Object
   ↳ org.apache.http.message.BasicHeaderElementIterator

Class Overview

Basic implementation of a HeaderElementIterator.

Summary

Public Constructors
BasicHeaderElementIterator(HeaderIterator headerIterator, HeaderValueParser parser)
Creates a new instance of BasicHeaderElementIterator
BasicHeaderElementIterator(HeaderIterator headerIterator)
Public Methods
boolean hasNext()
Indicates whether there is another header element in this iteration.
final Object next()
Returns the next object in the iteration, i.e.
HeaderElement nextElement()
Obtains the next header element from this iteration.
void remove()
Removes the last object returned by next from the collection.
[Expand]
Inherited Methods
From class java.lang.Object
From interface java.util.Iterator
From interface org.apache.http.HeaderElementIterator

Public Constructors

public BasicHeaderElementIterator (HeaderIterator headerIterator, HeaderValueParser parser)

Creates a new instance of BasicHeaderElementIterator

public BasicHeaderElementIterator (HeaderIterator headerIterator)

Public Methods

public boolean hasNext ()

Indicates whether there is another header element in this iteration.

Returns
  • true if there is another header element, false otherwise

public final Object next ()

Returns the next object in the iteration, i.e. returns the element in front of the iterator and advances the iterator by one position.

Returns
  • the next object.

public HeaderElement nextElement ()

Obtains the next header element from this iteration. This method should only be called while hasNext is true.

Returns
  • the next header element in this iteration

public void remove ()

Removes the last object returned by next from the collection. This method can only be called once after next was called.