Package org.codehaus.jackson.map
Class MappingIterator<T>
java.lang.Object
org.codehaus.jackson.map.MappingIterator<T>
- All Implemented Interfaces:
Iterator<T>
Iterator exposed by
ObjectMapper when binding sequence of
objects. Extension is done to allow more convenient exposing of
IOException (which basic Iterator does not expose)- Since:
- 1.8
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final booleanFlag that indicates whether inputJsonParsershould be closed when we are done or not; generally only called when caller did not pass JsonParser.protected final DeserializationContextprotected final JsonDeserializer<T> protected booleanFlag that is set when we have determined whathasNextValue()should value; reset whennextValue()is calledprotected JsonParserprotected final JavaTypeprotected final TIf not null, "value to update" instead of creating a new instance for each call.protected static final MappingIterator<?> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedMappingIterator(JavaType type, JsonParser jp, DeserializationContext ctxt, JsonDeserializer<?> deser) protectedMappingIterator(JavaType type, JsonParser jp, DeserializationContext ctxt, JsonDeserializer<?> deser, boolean closeParser, Object valueToUpdate) -
Method Summary
Modifier and TypeMethodDescriptionprotected static <T> MappingIterator<T> booleanhasNext()booleanEquivalent ofnext()but one that may throw checked exceptions from Jackson due to invalid input.next()voidremove()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining
-
Field Details
-
EMPTY_ITERATOR
-
_type
-
_context
-
_deserializer
-
_parser
-
_closeParser
protected final boolean _closeParserFlag that indicates whether inputJsonParsershould be closed when we are done or not; generally only called when caller did not pass JsonParser. -
_hasNextChecked
protected boolean _hasNextCheckedFlag that is set when we have determined whathasNextValue()should value; reset whennextValue()is called -
_updatedValue
If not null, "value to update" instead of creating a new instance for each call.
-
-
Constructor Details
-
MappingIterator
protected MappingIterator(JavaType type, JsonParser jp, DeserializationContext ctxt, JsonDeserializer<?> deser) -
MappingIterator
protected MappingIterator(JavaType type, JsonParser jp, DeserializationContext ctxt, JsonDeserializer<?> deser, boolean closeParser, Object valueToUpdate) - Since:
- 1.9.3
-
-
Method Details
-
emptyIterator
-
hasNext
public boolean hasNext() -
next
-
remove
public void remove() -
hasNextValue
Equivalent ofnext()but one that may throw checked exceptions from Jackson due to invalid input.- Throws:
IOException
-
nextValue
- Throws:
IOException
-