question: public PushHistory ( int maxHistoryLength , JSONObject json ) { this . maxHistoryLength = maxHistoryLength ; this . entries = new PriorityQueue < Entry > ( maxHistoryLength + 1 ) ; this . pushIds = new HashSet < String > ( maxHistoryLength + 1 ) ; this . lastTime = null ; if ( json != null ) { JSONObject jsonHistory = json . optJSONObject ( "seen" ) ; if ( jsonHistory != null ) { Iterator < String > it = jsonHistory . keys ( ) ; while ( it . hasNext ( ) ) { String pushId = ( String ) it . next ( ) ; String timestamp = jsonHistory . optString ( pushId , null ) ; if ( pushId != null && timestamp != null ) { tryInsertPush ( pushId , timestamp ) ; } } } setLastReceivedTimestamp ( json . optString ( "lastTime" , null ) ) ; } }
target:  Creates a push history object from a JSON object that looks like this: { "seen": { "push_id_1": "2013-11-01T22:01:00.000Z", "push_id_2": "2013-11-01T22:01:01.000Z", "push_id_3": "2013-11-01T22:01:02.000Z" }, "lastTime": "2013-11-01T22:01:02.000Z" } The "history" entries correspond to entries in the "entries" queue. The "lastTime" entry corresponds to the "lastTime" field.