@Ignore @Test public void simpleRun() throws IOException { Bundle bundle = new ListBundle(); BundleFilterCondition filter = (BundleFilterCondition) Configs.decodeObject( BundleFilter.class, "if {true {}}, then {log = PASSED}"); filter.filter(bundle); }
@Override public boolean filter(Bundle row) { boolean returnValue = true; if (row != null) { if (ifCondition != null && ifCondition.filter(row)) { if (ifDo != null) { boolean result = ifDo.filter(row); returnValue = returnFilter ? result : returnValue; } } else { if (elseDo != null) { boolean result = elseDo.filter(row); returnValue = returnFilter ? result : returnValue; } } } return returnValue; }
BundleFilterCondition implements BundleFilter { @Override public boolean filter(Bundle row) { boolean returnValue = true; if (row != null) { if (ifCondition != null && ifCondition.filter(row)) { if (ifDo != null) { boolean result = ifDo.filter(row); returnValue = returnFilter ? result : returnValue; } } else { if (elseDo != null) { boolean result = elseDo.filter(row); returnValue = returnFilter ? result : returnValue; } } } return returnValue; } }
BundleFilterCondition implements BundleFilter { @Override public boolean filter(Bundle row) { boolean returnValue = true; if (row != null) { if (ifCondition != null && ifCondition.filter(row)) { if (ifDo != null) { boolean result = ifDo.filter(row); returnValue = returnFilter ? result : returnValue; } } else { if (elseDo != null) { boolean result = elseDo.filter(row); returnValue = returnFilter ? result : returnValue; } } } return returnValue; } BundleFilterCondition();  BundleFilterCondition(@JsonProperty("if")   BundleFilter ifCondition,
                                 @JsonProperty("then") BundleFilter ifDo,
                                 @JsonProperty("else") BundleFilter elseDo); }
BundleFilterCondition implements BundleFilter { @Override public boolean filter(Bundle row) { boolean returnValue = true; if (row != null) { if (ifCondition != null && ifCondition.filter(row)) { if (ifDo != null) { boolean result = ifDo.filter(row); returnValue = returnFilter ? result : returnValue; } } else { if (elseDo != null) { boolean result = elseDo.filter(row); returnValue = returnFilter ? result : returnValue; } } } return returnValue; } BundleFilterCondition();  BundleFilterCondition(@JsonProperty("if")   BundleFilter ifCondition,
                                 @JsonProperty("then") BundleFilter ifDo,
                                 @JsonProperty("else") BundleFilter elseDo); @Override boolean filter(Bundle row); }
BundleFilterCondition implements BundleFilter { @Override public boolean filter(Bundle row) { boolean returnValue = true; if (row != null) { if (ifCondition != null && ifCondition.filter(row)) { if (ifDo != null) { boolean result = ifDo.filter(row); returnValue = returnFilter ? result : returnValue; } } else { if (elseDo != null) { boolean result = elseDo.filter(row); returnValue = returnFilter ? result : returnValue; } } } return returnValue; } BundleFilterCondition();  BundleFilterCondition(@JsonProperty("if")   BundleFilter ifCondition,
                                 @JsonProperty("then") BundleFilter ifDo,
                                 @JsonProperty("else") BundleFilter elseDo); @Override boolean filter(Bundle row);  }