Rule implements Comparable<Rule> { public static Rule buildRule(String text, Map<String, Set<String>> meta, double confidence, double support) { return buildRule(text, meta, confidence, support, 0); } private  Rule(); String getText(); double getConfidence(); double getSupport(); double getLift(); TupleCollection getAnt(); TupleCollection getCons(); static Rule buildRule(String text, Map<String, Set<String>> meta,
			double confidence, double support); static Rule buildRule(String text, Map<String, Set<String>> meta,
			double confidence, double support, double lift); static Rule buildRule(String text, double confidence, double support); static Rule buildRule(List<Tuple> antecedent, List<Tuple> consequent, double support, double confidence, double lift); double getRuleError(); void setRuleError(double ruleError); double getDefaultError(); void setDefaultError(double defaultError); Rule getDefaultRule(); void setDefaultRule(Rule defaultRule); synchronized void incClassCasesCovered(String className); synchronized void decClassCasesCovered(String className); synchronized void setClassCasesCovered(String className, int value); Map<String, Integer> getClassCasesCovered(); synchronized void addReplace(ASet aset); List<ASet> getReplaces(); boolean isMarked(); synchronized void mark(); synchronized void unmark(); void setConfidence(double confidence); void setSupport(double support); void setLift(double lift); @Override String toString(); int compareTo(Rule o);  }
@Test(expected = BadRuleFormatException.class) public void formating1() { Rule.buildRule("{}{a=3}", 0.0, 0.0); }
@Test(expected = BadRuleFormatException.class) public void formating2() { Rule.buildRule("{a=3}=> {}", 0.0, 0.0); }
@Test(expected = BadRuleFormatException.class) public void formating3() { Rule.buildRule("{a=1} > {b=2}", 0.0, 0.0); }
@Test(expected = BadRuleFormatException.class) public void formating4() { Rule.buildRule("{a} => {b=2}", 0.0, 0.0); }
@Test(expected = BadRuleFormatException.class) public void formating5() { Rule.buildRule("{a-1} => {b}", 0.0, 0.0); }
@Test(expected = BadRuleFormatException.class) public void emptyRule() { Rule r = Rule.buildRule("{} => {}", 0.0, 0.0); }