类 DistanceAdapter
java.lang.Object
com.google.gson.TypeAdapter<Distance>
ai.nextbillion.maps.internal.DistanceAdapter
public class DistanceAdapter extends com.google.gson.TypeAdapter<Distance>
This class handles conversion from JSON to
Distance.
Please see GSON Type Adapter for more detail.
-
构造器概要
构造器 构造器 说明 DistanceAdapter() -
方法概要
-
构造器详细资料
-
DistanceAdapter
public DistanceAdapter()
-
-
方法详细资料
-
read
Read a distance object from a Directions API result and convert it to aDistance.We are expecting to receive something akin to the following:
{ "value": 207, "text": "0.1 mi" }- 指定者:
read在类中com.google.gson.TypeAdapter<Distance>- 抛出:
java.io.IOException
-
write
public void write(com.google.gson.stream.JsonWriter writer, Distance value) throws java.io.IOExceptionThis method is not implemented.- 指定者:
write在类中com.google.gson.TypeAdapter<Distance>- 抛出:
java.io.IOException
-