public class MappingIterator<T> extends Object implements Iterator<T>, Closeable
ObjectMapper when binding sequence of
objects. Extension is done to allow more convenient exposing of
IOException (which basic Iterator does not expose)| Modifier and Type | Method and Description |
|---|---|
void |
close() |
static <T> MappingIterator<T> |
emptyIterator()
Method for getting an "empty" iterator instance: one that never
has more values; may be freely shared.
|
JsonLocation |
getCurrentLocation()
Convenience method, functionally equivalent to:
iterator.getParser().getCurrentLocation()
|
JsonParser |
getParser()
Accessor for getting underlying parser this iterator uses.
|
FormatSchema |
getParserSchema()
Accessor for accessing
FormatSchema that the underlying parser
(as per getParser()) is using, if any; only parser of schema-aware
formats use schemas. |
boolean |
hasNext() |
boolean |
hasNextValue()
Equivalent of
next() but one that may throw checked
exceptions from Jackson due to invalid input. |
T |
next() |
T |
nextValue() |
List<T> |
readAll()
Convenience method for reading all entries accessible via
this iterator; resulting container will be a
ArrayList. |
<C extends Collection<? super T>> |
readAll(C results)
Convenience method for reading all entries accessible via
this iterator
|
<L extends List<? super T>> |
readAll(L resultList)
Convenience method for reading all entries accessible via
this iterator
|
void |
remove() |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingpublic static <T> MappingIterator<T> emptyIterator()
public since 2.10public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic boolean hasNextValue()
throws IOException
next() but one that may throw checked
exceptions from Jackson due to invalid input.IOExceptionpublic T nextValue() throws IOException
IOExceptionpublic List<T> readAll() throws IOException
ArrayList.IOExceptionpublic <L extends List<? super T>> L readAll(L resultList) throws IOException
IOExceptionpublic <C extends Collection<? super T>> C readAll(C results) throws IOException
IOExceptionpublic JsonParser getParser()
public FormatSchema getParserSchema()
FormatSchema that the underlying parser
(as per getParser()) is using, if any; only parser of schema-aware
formats use schemas.public JsonLocation getCurrentLocation()
iterator.getParser().getCurrentLocation()
Copyright © 2010 - 2020 Adobe. All Rights Reserved