Class DurationAdapter

java.lang.Object
com.google.gson.TypeAdapter<Duration>
xyz.srnyx.annoyingapi.stats.gson.adapter.DurationAdapter

public class DurationAdapter extends com.google.gson.TypeAdapter<Duration>
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull Duration
    read(@NotNull com.google.gson.stream.JsonReader in)
     
    void
    write(@NotNull com.google.gson.stream.JsonWriter out, @Nullable Duration value)
     

    Methods inherited from class com.google.gson.TypeAdapter

    fromJson, fromJson, fromJsonTree, nullSafe, toJson, toJson, toJsonTree

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DurationAdapter

      public DurationAdapter()
  • Method Details

    • write

      public void write(@NotNull @NotNull com.google.gson.stream.JsonWriter out, @Nullable @Nullable Duration value) throws IOException
      Specified by:
      write in class com.google.gson.TypeAdapter<Duration>
      Throws:
      IOException
    • read

      @NotNull public @NotNull Duration read(@NotNull @NotNull com.google.gson.stream.JsonReader in) throws IOException
      Specified by:
      read in class com.google.gson.TypeAdapter<Duration>
      Throws:
      IOException