public class IteratorByteIterator extends Object implements ByteIterator
Number-valued
Iterator
to the ByteIterator
interface.
This implementation delegates most methods
to the provided Iterator
implementation in the "obvious" way.| Constructor and Description |
|---|
IteratorByteIterator(Iterator iterator)
Creates an
ByteIterator wrapping
the specified Iterator. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext()
Returns
true iff I have more elements. |
byte |
next()
Returns the next element in me.
|
void |
remove()
Removes from my underlying collection the last
element
returned by me
(optional operation). |
static ByteIterator |
wrap(Iterator iterator)
Create an
ByteIterator wrapping
the specified Iterator. |
public IteratorByteIterator(Iterator iterator)
ByteIterator wrapping
the specified Iterator.wrap(java.util.Iterator)public static ByteIterator wrap(Iterator iterator)
ByteIterator wrapping
the specified Iterator. When
the given iterator is null,
returns null.iterator - the (possibly null)
Iterator to wrapByteIterator wrapping the given
iterator, or null when iterator is
null.public boolean hasNext()
ByteIteratortrue iff I have more elements.
(In other words, returns true iff
a subsequent call to next will return
an element rather than throwing an exception.)hasNext in interface ByteIteratortrue iff I have more elementspublic byte next()
ByteIteratornext in interface ByteIteratorpublic void remove()
ByteIteratorreturned by me
(optional operation).remove in interface ByteIteratorCopyright © 2002-2013 The Apache Software Foundation. All Rights Reserved.