Package com.mapbox.geojson
Class PointAsCoordinatesTypeAdapter
- java.lang.Object
-
- com.google.gson.TypeAdapter<T>
-
- com.mapbox.geojson.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
-
-
Constructor Summary
Constructors Constructor Description PointAsCoordinatesTypeAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Pointread(com.google.gson.stream.JsonReader in)protected PointreadPoint(com.google.gson.stream.JsonReader in)protected java.util.List<java.lang.Double>readPointList(com.google.gson.stream.JsonReader in)voidwrite(com.google.gson.stream.JsonWriter out, Point value)protected voidwritePoint(com.google.gson.stream.JsonWriter out, Point point)protected voidwritePointList(com.google.gson.stream.JsonWriter out, java.util.List<java.lang.Double> value)
-
-
-
Method Detail
-
write
public void write(com.google.gson.stream.JsonWriter out, Point value) throws java.io.IOException- Specified by:
writein classcom.google.gson.TypeAdapter<Point>- Throws:
java.io.IOException
-
read
public Point read(com.google.gson.stream.JsonReader in) throws java.io.IOException
- Specified by:
readin classcom.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
-
-