Package org.apache.http.message
Class BasicHeaderElementIterator
- java.lang.Object
-
- org.apache.http.message.BasicHeaderElementIterator
-
- All Implemented Interfaces:
Iterator<Object>,HeaderElementIterator
public class BasicHeaderElementIterator extends Object implements HeaderElementIterator
Basic implementation of aHeaderElementIterator.- Since:
- 4.0
-
-
Constructor Summary
Constructors Constructor Description BasicHeaderElementIterator(HeaderIterator headerIterator)BasicHeaderElementIterator(HeaderIterator headerIterator, HeaderValueParser parser)Creates a new instance of BasicHeaderElementIterator
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasNext()Indicates whether there is another header element in this iteration.Objectnext()HeaderElementnextElement()Obtains the next header element from this iteration.voidremove()-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
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:HeaderElementIteratorIndicates whether there is another header element in this iteration.- Specified by:
hasNextin interfaceHeaderElementIterator- Specified by:
hasNextin interfaceIterator<Object>- Returns:
trueif there is another header element,falseotherwise
-
nextElement
public HeaderElement nextElement() throws NoSuchElementException
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
public final Object next() throws NoSuchElementException
- Specified by:
nextin interfaceIterator<Object>- Throws:
NoSuchElementException
-
remove
public void remove() throws UnsupportedOperationException- Specified by:
removein interfaceIterator<Object>- Throws:
UnsupportedOperationException
-
-