Package org.apache.http.message
Class BasicHeaderElementIterator
java.lang.Object
org.apache.http.message.BasicHeaderElementIterator
- All Implemented Interfaces:
Iterator,HeaderElementIterator
public class BasicHeaderElementIterator extends Object implements HeaderElementIterator
Basic implementation of a
HeaderElementIterator.- Version:
- $Revision: 592088 $
- Author:
- Andrea Selva
, Oleg Kalnichevski
-
Constructor Summary
Constructors Constructor Description BasicHeaderElementIterator(HeaderIterator headerIterator)BasicHeaderElementIterator(HeaderIterator headerIterator, HeaderValueParser parser)Creates a new instance of BasicHeaderElementIterator -
Method Summary
Modifier and Type Method Description booleanhasNext()Indicates whether there is another header element in this iteration.Objectnext()Returns the next object and advances the iterator.HeaderElementnextElement()Obtains the next header element from this iteration.voidremove()Removes the last object returned bynextfrom the collection.
-
Constructor Details
-
BasicHeaderElementIterator
Creates a new instance of BasicHeaderElementIterator -
BasicHeaderElementIterator
-
-
Method Details
-
hasNext
public boolean hasNext()Description copied from interface:HeaderElementIteratorIndicates whether there is another header element in this iteration.- Specified by:
hasNextin interfaceHeaderElementIterator- Specified by:
hasNextin interfaceIterator- Returns:
trueif there is another header element,falseotherwise- See Also:
Iterator.next()
-
nextElement
Description copied from interface:HeaderElementIteratorObtains the next header element from this iteration. This method should only be called whilehasNextis true.- Specified by:
nextElementin interfaceHeaderElementIterator- Returns:
- the next header element in this iteration
- Throws:
NoSuchElementException
-
next
Description copied from interface:IteratorReturns the next object and advances the iterator.- Specified by:
nextin interfaceIterator- Returns:
- the next object.
- Throws:
NoSuchElementException- if there are no more elements.- See Also:
Iterator.hasNext()
-
remove
Description copied from interface:IteratorRemoves the last object returned bynextfrom the collection. This method can only be called once between each call tonext.- Specified by:
removein interfaceIterator- Throws:
UnsupportedOperationException- if removing is not supported by the collection being iterated.
-