public T find ( String id ) { SharedPreferences prefs = loadSharedPreferences ( "object" ) ; JSONObject object = null ; try { String json = prefs . getString ( String . valueOf ( id ) , null ) ; if ( json == null ) return null ; object = new JSONObject ( json ) ; } catch ( JSONException e ) { e . printStackTrace ( ) ; } return fromJson ( object ) ; }
Find a specific object from its id .