@Test public void requireThatPredicatesCanBeBuiltUsingSeparateMethodCalls() { Conjunction conjunction = new Conjunction(); FeatureSet countrySet = new FeatureSet("country"); countrySet.addValue("no"); countrySet.addValue("se"); conjunction.addOperand(countrySet); FeatureRange ageRange = new FeatureRange("age"); ageRange.setFromInclusive(20L); conjunction.addOperand(ageRange); FeatureRange heightRange = new FeatureRange("height"); heightRange.setToInclusive(160L); conjunction.addOperand(heightRange); assertEquals("country in [no, se] and age in [20..] and height in [..160]", conjunction.toString()); }
@Override public final String toString() { StringBuilder out = new StringBuilder(); appendTo(out); return out.toString(); }
Predicate implements Cloneable { @Override public final String toString() { StringBuilder out = new StringBuilder(); appendTo(out); return out.toString(); } }
Predicate implements Cloneable { @Override public final String toString() { StringBuilder out = new StringBuilder(); appendTo(out); return out.toString(); }  }
Predicate implements Cloneable { @Override public final String toString() { StringBuilder out = new StringBuilder(); appendTo(out); return out.toString(); }  @Override Predicate clone(); @Override final String toString(); static String asciiEncode(String str); static String asciiDecode(String str); static Predicate fromBinary(byte[] buf); static Predicate fromString(String str); }
Predicate implements Cloneable { @Override public final String toString() { StringBuilder out = new StringBuilder(); appendTo(out); return out.toString(); }  @Override Predicate clone(); @Override final String toString(); static String asciiEncode(String str); static String asciiDecode(String str); static Predicate fromBinary(byte[] buf); static Predicate fromString(String str);  }