Class MappingIterator<T>

    • Method Detail

      • emptyIterator

        public static <T> MappingIterator<T> emptyIterator()
        Method for getting an "empty" iterator instance: one that never has more values; may be freely shared.
        Since:
        2.10 Existed earlier but public since 2.10
      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface Iterator<T>
      • next

        public T next()
        Specified by:
        next in interface Iterator<T>
      • remove

        public void remove()
        Specified by:
        remove in interface Iterator<T>
      • hasNextValue

        public boolean hasNextValue()
                             throws IOException
        Equivalent of next() but one that may throw checked exceptions from Jackson due to invalid input.
        Throws:
        IOException
      • readAll

        public List<T> readAll()
                        throws IOException
        Convenience method for reading all entries accessible via this iterator; resulting container will be a ArrayList.
        Returns:
        List of entries read
        Throws:
        IOException
        Since:
        2.2
      • readAll

        public <L extends List<? super T>> L readAll​(L resultList)
                                              throws IOException
        Convenience method for reading all entries accessible via this iterator
        Returns:
        List of entries read (same as passed-in argument)
        Throws:
        IOException
        Since:
        2.2
      • readAll

        public <C extends Collection<? super T>> C readAll​(C results)
                                                    throws IOException
        Convenience method for reading all entries accessible via this iterator
        Throws:
        IOException
        Since:
        2.5
      • getParser

        public JsonParser getParser()
        Accessor for getting underlying parser this iterator uses.
        Since:
        2.2
      • getParserSchema

        public 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.
        Since:
        2.2
      • getCurrentLocation

        public JsonLocation getCurrentLocation()
        Convenience method, functionally equivalent to: iterator.getParser().getCurrentLocation()
        Returns:
        Location of the input stream of the underlying parser
        Since:
        2.2.1