Package org.apache.http
Interface TokenIterator
-
- All Superinterfaces:
java.util.Iterator<java.lang.Object>
- All Known Implementing Classes:
BasicTokenIterator
public interface TokenIterator extends java.util.Iterator<java.lang.Object>
An iterator forString
tokens. This interface is designed as a complement toHeaderElementIterator
, in cases where the items are plain strings rather than full header elements.- Since:
- 4.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
hasNext()
Indicates whether there is another token in this iteration.java.lang.String
nextToken()
Obtains the next token from this iteration.
-
-
-
Method Detail
-
hasNext
boolean hasNext()
Indicates whether there is another token in this iteration.- Specified by:
hasNext
in interfacejava.util.Iterator<java.lang.Object>
- Returns:
true
if there is another token,false
otherwise
-
nextToken
java.lang.String nextToken()
Obtains the next token from this iteration. This method should only be called whilehasNext
is true.- Returns:
- the next token in this iteration
-
-