Class JsonParser.Typed<T>

java.lang.Object
com.google.gson.TypeAdapter<T>
net.buildtheearth.terraminusminus.dataset.osm.JsonParser<T>
net.buildtheearth.terraminusminus.dataset.osm.JsonParser.Typed<T>
All Implemented Interfaces:
BiFunction<String,com.google.gson.stream.JsonReader,T>, net.daporkchop.lib.common.function.io.IOBiFunction<String,com.google.gson.stream.JsonReader,T>
Direct Known Subclasses:
DrawFunctionParser, DValueParser, LineParser, MatchParser, PolygonConvert.Parser, PolygonParser
Enclosing class:
JsonParser<T>

public abstract static class JsonParser.Typed<T> extends JsonParser<T>
Parses a single value with a named type.
  • Field Details

    • name

      @NonNull protected final @NonNull String name
    • types

      @NonNull protected final @NonNull Map<String,Class<? extends T>> types
  • Constructor Details

  • Method Details

    • read

      public T read(com.google.gson.stream.JsonReader in) throws IOException
      Specified by:
      read in class com.google.gson.TypeAdapter<T>
      Throws:
      IOException
    • applyThrowing

      public T applyThrowing(String type, com.google.gson.stream.JsonReader in) throws IOException
      Specified by:
      applyThrowing in interface net.daporkchop.lib.common.function.io.IOBiFunction<String,com.google.gson.stream.JsonReader,T>
      Throws:
      IOException