org.apache.http.message
Class BasicHeaderElementIterator

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

public class BasicHeaderElementIterator
extends Object
implements HeaderElementIterator

Basic implementation of a HeaderElementIterator.

Since:
4.0

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()
           
 HeaderElement nextElement()
          Obtains the next header element from this iteration.
 void remove()
           
 
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<Object>
Specified by:
hasNext in interface HeaderElementIterator
Returns:
true if there is another header element, false otherwise

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
Specified by:
next in interface Iterator<Object>
Throws:
NoSuchElementException

remove

public void remove()
            throws UnsupportedOperationException
Specified by:
remove in interface Iterator<Object>
Throws:
UnsupportedOperationException


Copyright © 2005–2019 The Apache Software Foundation. All rights reserved.