Back to project page amulet.
The source code is released under:
MIT License
If you think the Android project amulet listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package scamell.michael.amulet; //www . j a v a2 s . c om import android.util.Log; import org.json.JSONObject; public class TaskEntry { protected String date, taskType, taskValue, units; public TaskEntry() { //default constructor } public TaskEntry(String mTimeStamp, String mTaskType, String mTaskValue, String mUnits) { this.date = mTimeStamp; this.taskType = mTaskType; this.taskValue = mTaskValue; this.units = mUnits; } public TaskEntry(JSONObject jsonObject) { try { date = jsonObject.getString("date"); taskType = jsonObject.getString("tasktype"); taskValue = jsonObject.getString("taskvalue"); units = jsonObject.getString("units"); } catch (Exception e) { Log.e("ERROR_TASK_ENTRY_OBJECT", "Couldn't create object from JSONObject"); e.printStackTrace(); } } }