Class PointAsCoordinatesTypeAdapter


  • public class PointAsCoordinatesTypeAdapter
    extends com.google.gson.TypeAdapter<T>
    TypeAdapter to serialize Point as coordinates, i.e array of doubles and to deserialize into Point out of array of doubles.
    Since:
    4.6.0
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Point read​(com.google.gson.stream.JsonReader in)  
      protected Point readPoint​(com.google.gson.stream.JsonReader in)  
      protected java.util.List<java.lang.Double> readPointList​(com.google.gson.stream.JsonReader in)  
      void write​(com.google.gson.stream.JsonWriter out, Point value)  
      protected void writePoint​(com.google.gson.stream.JsonWriter out, Point point)  
      protected void writePointList​(com.google.gson.stream.JsonWriter out, java.util.List<java.lang.Double> 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 Detail

      • PointAsCoordinatesTypeAdapter

        public PointAsCoordinatesTypeAdapter()
    • Method Detail

      • write

        public void write​(com.google.gson.stream.JsonWriter out,
                          Point value)
                   throws java.io.IOException
        Specified by:
        write in class com.google.gson.TypeAdapter<Point>
        Throws:
        java.io.IOException
      • read

        public Point read​(com.google.gson.stream.JsonReader in)
                   throws java.io.IOException
        Specified by:
        read in class com.google.gson.TypeAdapter<Point>
        Throws:
        java.io.IOException
      • writePoint

        protected void writePoint​(com.google.gson.stream.JsonWriter out,
                                  Point point)
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • readPoint

        protected Point readPoint​(com.google.gson.stream.JsonReader in)
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • writePointList

        protected void writePointList​(com.google.gson.stream.JsonWriter out,
                                      java.util.List<java.lang.Double> value)
                               throws java.io.IOException
        Throws:
        java.io.IOException
      • readPointList

        protected java.util.List<java.lang.Double> readPointList​(com.google.gson.stream.JsonReader in)
                                                          throws java.io.IOException
        Throws:
        java.io.IOException