1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- package com.luticate.utils.dbo.JSONContainer;
-
- import org.json.JSONArray;
- import org.json.JSONException;
- import org.json.JSONObject;
-
- /**
- * Created by robin on 10/21/16.
- */
-
- public class LuJSONObjectContainer implements LuAbstractJsonContainer {
-
- protected JSONObject _jsonObject;
-
- public LuJSONObjectContainer(JSONObject jsonObject)
- {
- _jsonObject = jsonObject;
- }
-
- @Override
- public int getInt(Object key) throws JSONException {
- return _jsonObject.getInt((String) key);
- }
-
- @Override
- public String getString(Object key) throws JSONException {
- return _jsonObject.getString((String) key);
- }
-
- @Override
- public long getLong(Object key) throws JSONException {
- return _jsonObject.getLong((String) key);
- }
-
- @Override
- public double getDouble(Object key) throws JSONException {
- return _jsonObject.getDouble((String) key);
- }
-
- @Override
- public boolean getBoolean(Object key) throws JSONException {
- return _jsonObject.getBoolean((String) key);
- }
-
- @Override
- public JSONObject getJSONObject(Object key) throws JSONException {
- return _jsonObject.getJSONObject((String) key);
- }
-
- @Override
- public JSONArray getJSONArray(Object key) throws JSONException {
- return _jsonObject.getJSONArray((String) key);
- }
-
- @Override
- public boolean isNull(Object key) throws JSONException {
- return _jsonObject.isNull((String) key);
- }
- }
|