@Test public void toJSONTest() { TriggerTempTarget t = new TriggerTempTarget().comparator(ComparatorExists.Compare.EXISTS); Assert.assertEquals(ttJson, t.toJSON()); }
@Override public synchronized String toJSON() { JSONObject o = new JSONObject(); try { o.put("type", TriggerTempTarget.class.getName()); JSONObject data = new JSONObject(); data.put("lastRun", lastRun); data.put("comparator", comparator.getValue().toString()); o.put("data", data); } catch (JSONException e) { log.error("Unhandled exception", e); } return o.toString(); }
TriggerTempTarget extends Trigger { @Override public synchronized String toJSON() { JSONObject o = new JSONObject(); try { o.put("type", TriggerTempTarget.class.getName()); JSONObject data = new JSONObject(); data.put("lastRun", lastRun); data.put("comparator", comparator.getValue().toString()); o.put("data", data); } catch (JSONException e) { log.error("Unhandled exception", e); } return o.toString(); } }
TriggerTempTarget extends Trigger { @Override public synchronized String toJSON() { JSONObject o = new JSONObject(); try { o.put("type", TriggerTempTarget.class.getName()); JSONObject data = new JSONObject(); data.put("lastRun", lastRun); data.put("comparator", comparator.getValue().toString()); o.put("data", data); } catch (JSONException e) { log.error("Unhandled exception", e); } return o.toString(); } TriggerTempTarget(); private  TriggerTempTarget(TriggerTempTarget triggerTempTarget); }
TriggerTempTarget extends Trigger { @Override public synchronized String toJSON() { JSONObject o = new JSONObject(); try { o.put("type", TriggerTempTarget.class.getName()); JSONObject data = new JSONObject(); data.put("lastRun", lastRun); data.put("comparator", comparator.getValue().toString()); o.put("data", data); } catch (JSONException e) { log.error("Unhandled exception", e); } return o.toString(); } TriggerTempTarget(); private  TriggerTempTarget(TriggerTempTarget triggerTempTarget); ComparatorExists getComparator(); @Override synchronized boolean shouldRun(); @Override synchronized String toJSON(); @Override int friendlyName(); @Override String friendlyDescription(); @Override Optional<Integer> icon(); @Override Trigger duplicate(); TriggerTempTarget comparator(ComparatorExists.Compare compare); @Override void generateDialog(LinearLayout root, FragmentManager fragmentManager); }
TriggerTempTarget extends Trigger { @Override public synchronized String toJSON() { JSONObject o = new JSONObject(); try { o.put("type", TriggerTempTarget.class.getName()); JSONObject data = new JSONObject(); data.put("lastRun", lastRun); data.put("comparator", comparator.getValue().toString()); o.put("data", data); } catch (JSONException e) { log.error("Unhandled exception", e); } return o.toString(); } TriggerTempTarget(); private  TriggerTempTarget(TriggerTempTarget triggerTempTarget); ComparatorExists getComparator(); @Override synchronized boolean shouldRun(); @Override synchronized String toJSON(); @Override int friendlyName(); @Override String friendlyDescription(); @Override Optional<Integer> icon(); @Override Trigger duplicate(); TriggerTempTarget comparator(ComparatorExists.Compare compare); @Override void generateDialog(LinearLayout root, FragmentManager fragmentManager);  }