public class Session extends Object
限定符和类型 | 方法和说明 |
---|---|
void |
clear() |
void |
clearAll() |
boolean |
containsKey(String key) |
boolean |
containsValue(Object value) |
Object |
get(String key) |
boolean |
getBoolean(String key,
boolean defValue) |
float |
getFloat(String key,
float defValue) |
int |
getInt(String key,
int defValue) |
JSONArray |
getJSONArray(String key) |
JSONObject |
getJSONObject(String key) |
long |
getLong(String key,
long defValue) |
String |
getName() |
Serializable |
getSerializable(String key) |
String |
getString(String key,
String defValue) |
Set<String> |
getStringSet(String key,
Set<String> defValue) |
void |
put(String key,
Object value) |
void |
putAll(Map<String,?> map) |
void |
refresh() |
void |
remove(String key) |
void |
saveAll(Map<String,?> map) |
void |
saveBoolean(String key,
boolean value) |
void |
saveFloat(String key,
float value) |
void |
saveInt(String key,
int value) |
void |
saveJSONArray(String key,
JSONArray value) |
void |
saveJSONObject(String key,
JSONObject value) |
void |
saveLong(String key,
long value) |
void |
saveSerializable(String key,
Serializable value) |
void |
saveString(String key,
String value) |
void |
saveStringSet(String key,
Set<String> value) |
public Session(Context context, String name)
public String getName()
public boolean containsKey(String key)
public boolean containsValue(Object value)
public int getInt(String key, int defValue)
public boolean getBoolean(String key, boolean defValue)
public long getLong(String key, long defValue)
public float getFloat(String key, float defValue)
public JSONObject getJSONObject(String key)
public JSONArray getJSONArray(String key)
public Serializable getSerializable(String key)
public void saveInt(String key, int value)
public void saveBoolean(String key, boolean value)
public void saveFloat(String key, float value)
public void saveLong(String key, long value)
public void saveJSONObject(String key, JSONObject value)
public void saveJSONArray(String key, JSONArray value)
public void saveSerializable(String key, Serializable value)
public void remove(String key)
public void clear()
public void clearAll()
public void refresh()