Sha256: 50e87d145fabdfc10b047d19c1691907c508bf06fcb9f863476e82d6f380c2de
Contents?: true
Size: 853 Bytes
Versions: 12
Compression:
Stored size: 853 Bytes
Contents
package com.rho.sync; import org.json.me.JSONArray; import org.json.me.JSONException; import org.json.me.JSONObject; class JSONArrayIterator { JSONArray m_array; int m_nCurItem; JSONArrayIterator(String szData)throws JSONException { m_array = new JSONArray(szData); m_nCurItem = 0; } JSONArrayIterator(JSONEntry oEntry, String strName)throws JSONException { m_array = (JSONArray)oEntry.m_object.get(strName); m_nCurItem = 0; } boolean isEnd() { return !(m_array != null && m_nCurItem < m_array.length()); } void next() { m_nCurItem++; } void reset(int nPos) { m_nCurItem = nPos; } int getCurPos(){ return m_nCurItem; } JSONEntry getCurItem()throws JSONException { return new JSONEntry( isEnd() ? null : (JSONObject) m_array.get(m_nCurItem) ); } }
Version data entries
12 entries across 12 versions & 1 rubygems