package com.miguelgaeta.message_parser;

import java.io.IOException;
import java.util.List;

/**
 * Created by Miguel Gaeta on 1/19/16.
 */
@SuppressWarnings("UnusedDeclaration")
public interface MessageParser {

    boolean beginObject() throws IOException;

    void endObject() throws IOException;

    void close() throws IOException;

    boolean hasNext() throws IOException;

    String nextName() throws IOException;

    void skipValue() throws IOException;

    void nextNull() throws IOException;

    String nextString() throws IOException;

    String nextString(String defaultValue) throws IOException;

    String nextStringOrNull() throws IOException;

    boolean nextBoolean() throws IOException;

    boolean nextBoolean(boolean defaultValue) throws IOException;

    Boolean nextBooleanOrNull() throws IOException;

    double nextDouble() throws IOException;

    long nextLong() throws IOException;

    long nextLong(long defaultValue) throws IOException;

    Long nextLongOrNull() throws IOException;

    int nextInt() throws IOException;

    int nextInt(int defaultValue) throws IOException;

    Integer nextIntOrNull() throws IOException;

    <T> List<T> nextList(ListInitializer<T> initializer, ListItem<T> item) throws IOException;

    <T> List<T> nextList(ListInitializer<T> initializer, ListItem<T> item, boolean filterNull) throws IOException;

    boolean nextObject(ObjectFieldAssigner handler) throws IOException;

    interface ListInitializer<T> {

        List<T> get();
    }

    interface ListItem<T> {

        T get() throws IOException;
    }

    interface ObjectFieldAssigner {

        void assign() throws IOException;
    }
}

@@ -866,32 +866,148 @@
 s IOException;%0A%0A
+    double nextDouble(boolean defaultValue) throws IOException;%0A%0A    Double nextDoubleOrNull() throws IOException;%0A%0A
     long nextLon
@@ -1596,24 +1596,177 @@
 lizer%3CT%3E %7B%0A%0A
+        /**%0A         * Provides an initialized list implementation.%0A         *%0A         * @return A concrete mutable implementation of List.%0A         */%0A
         List

Add a documentation snippet.