public class MappingIterator<T>
extends java.lang.Object
implements java.util.Iterator<T>, java.io.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() |
java.util.List<T> |
readAll()
Convenience method for reading all entries accessible via
this iterator; resulting container will be a
ArrayList . |
<C extends java.util.Collection<? super T>> |
readAll(C results)
Convenience method for reading all entries accessible via
this iterator
|
<L extends java.util.List<? super T>> |
readAll(L resultList)
Convenience method for reading all entries accessible via
this iterator
|
void |
remove() |
public static <T> MappingIterator<T> emptyIterator()
public
since 2.10public boolean hasNext()
hasNext
in interface java.util.Iterator<T>
public void remove()
remove
in interface java.util.Iterator<T>
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
java.io.IOException
public boolean hasNextValue() throws java.io.IOException
next()
but one that may throw checked
exceptions from Jackson due to invalid input.java.io.IOException
public T nextValue() throws java.io.IOException
java.io.IOException
public java.util.List<T> readAll() throws java.io.IOException
ArrayList
.java.io.IOException
public <L extends java.util.List<? super T>> L readAll(L resultList) throws java.io.IOException
java.io.IOException
public <C extends java.util.Collection<? super T>> C readAll(C results) throws java.io.IOException
java.io.IOException
public 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