mobi.voiceassistant.client.converter
Class RemoteTokenConverter<T extends RemoteModel>

java.lang.Object
  extended by mobi.voiceassistant.client.converter.RemoteTokenConverter<T>
All Implemented Interfaces:
TokenConverter<ArrayList<T>>
Direct Known Subclasses:
City.Converter, SimpleRemoteTokenConverter

public abstract class RemoteTokenConverter<T extends RemoteModel>
extends Object
implements TokenConverter<ArrayList<T>>

Created with IntelliJ IDEA. User: morfeusys Date: 31.01.13 Time: 13:04


Constructor Summary
RemoteTokenConverter()
           
 
Method Summary
 ArrayList<T> convert(Token token)
           
abstract  T fromJson(JSONObject json)
           
 T fromJson(String json)
           
 List<T> fromJsonArray(JSONArray array)
           
 List<T> fromJsonArray(String json)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteTokenConverter

public RemoteTokenConverter()
Method Detail

fromJsonArray

public List<T> fromJsonArray(String json)

fromJsonArray

public List<T> fromJsonArray(JSONArray array)
                                          throws JSONException
Throws:
JSONException

fromJson

public T fromJson(String json)

convert

public ArrayList<T> convert(Token token)
Specified by:
convert in interface TokenConverter<ArrayList<T extends RemoteModel>>

fromJson

public abstract T fromJson(JSONObject json)
                                        throws JSONException
Throws:
JSONException