E
- the type of the object that the items in the JSON Array are converted intopublic class JsonIterableInputConverter<E> extends InputStreamIterableInputConverter<E> implements java.util.Iterator<E>
JsonConverter
.Constructor and Description |
---|
JsonIterableInputConverter(java.lang.Class<E> targetClass)
Construct a new instance of a JsonIterableInputConverter that is able to convert the data read from the
InputStream into objects of the specified
targetClass . |
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext()
Returns
true if the iteration has more elements, in this case if there are more elements to be
returned from the JSON Array that was read from the InputStream. |
java.util.Iterator<E> |
iterator()
Returns an Iterator that loops over the items in the JSON Array that is read from the InputStream.
|
E |
next()
Returns the next element in the iteration.
|
getInputStream, setInputStream
public JsonIterableInputConverter(java.lang.Class<E> targetClass)
targetClass
.
The targetClass
can be any of the types listed below. All other types will be converted from
JSON by using a JsonConverter
.
targetClass
- The class defining the objects being converted from JSON.public E next()
next
in interface java.util.Iterator<E>
public boolean hasNext()
true
if the iteration has more elements, in this case if there are more elements to be
returned from the JSON Array that was read from the InputStream.hasNext
in interface java.util.Iterator<E>
true
if there are more items available in the Iterator, false
otherwise.public java.util.Iterator<E> iterator()
next()
method is called.iterator
in interface IterableInputConverter<E>