@Test public void createExistingSubCnfTest() { CNF base = getPredicate( "MATCH (a), (b), (c) WHERE a=b AND a.name = \"Alice\" AND c.name = \"Chris\"" ); CNF expectedReturnValue = getPredicate( "MATCH (a), (b), (c) WHERE a.name = \"Alice\" AND c.name = \"Chris\"" ); assertEquals(expectedReturnValue, base.getSubCNF(Sets.newHashSet("a", "c"))); assertEquals(new CNF(), base.getSubCNF(Sets.newHashSet("b"))); }
public CNF getSubCNF(String variable) { Set<String> variables = new HashSet<>(1); variables.add(variable); return getSubCNF(variables); }
CNF extends PredicateCollection<CNFElement> { public CNF getSubCNF(String variable) { Set<String> variables = new HashSet<>(1); variables.add(variable); return getSubCNF(variables); } }
CNF extends PredicateCollection<CNFElement> { public CNF getSubCNF(String variable) { Set<String> variables = new HashSet<>(1); variables.add(variable); return getSubCNF(variables); } CNF();  CNF(List<CNFElement> predicates);  CNF(CNF copyValue); }
CNF extends PredicateCollection<CNFElement> { public CNF getSubCNF(String variable) { Set<String> variables = new HashSet<>(1); variables.add(variable); return getSubCNF(variables); } CNF();  CNF(List<CNFElement> predicates);  CNF(CNF copyValue); CNF and(CNF other); CNF or(CNF other); @Override boolean evaluate(Embedding embedding, EmbeddingMetaData metaData); @Override boolean evaluate(GraphElement graphElement); @Override String operatorName(); CNF getSubCNF(String variable); CNF getSubCNF(Set<String> variables); CNF removeSubCNF(String variable); CNF removeSubCNF(Set<String> variables); @Override Set<String> getVariables(); @Override Set<String> getPropertyKeys(String variable); }
CNF extends PredicateCollection<CNFElement> { public CNF getSubCNF(String variable) { Set<String> variables = new HashSet<>(1); variables.add(variable); return getSubCNF(variables); } CNF();  CNF(List<CNFElement> predicates);  CNF(CNF copyValue); CNF and(CNF other); CNF or(CNF other); @Override boolean evaluate(Embedding embedding, EmbeddingMetaData metaData); @Override boolean evaluate(GraphElement graphElement); @Override String operatorName(); CNF getSubCNF(String variable); CNF getSubCNF(Set<String> variables); CNF removeSubCNF(String variable); CNF removeSubCNF(Set<String> variables); @Override Set<String> getVariables(); @Override Set<String> getPropertyKeys(String variable);  }