@Test public void testSatisfiesProposition() { World v = new World(); v.propositions = "A,B,C"; assertEquals(true, v.satisfiesProposition("A")); assertEquals(true, v.satisfiesProposition("B")); assertEquals(true, v.satisfiesProposition("C")); assertEquals(false, v.satisfiesProposition("X")); assertEquals(false, v.satisfiesProposition("A,B")); assertEquals(false, v.satisfiesProposition("")); }
public boolean satisfiesProposition(String proposition) { proposition = proposition.trim(); String[] props = propositions.split(","); for (String prop : props) if (proposition.equalsIgnoreCase(prop.trim())) return true; return false; }
World extends Vertex { public boolean satisfiesProposition(String proposition) { proposition = proposition.trim(); String[] props = propositions.split(","); for (String prop : props) if (proposition.equalsIgnoreCase(prop.trim())) return true; return false; } }
World extends Vertex { public boolean satisfiesProposition(String proposition) { proposition = proposition.trim(); String[] props = propositions.split(","); for (String prop : props) if (proposition.equalsIgnoreCase(prop.trim())) return true; return false; } World();  World(Configuration config); }
World extends Vertex { public boolean satisfiesProposition(String proposition) { proposition = proposition.trim(); String[] props = propositions.split(","); for (String prop : props) if (proposition.equalsIgnoreCase(prop.trim())) return true; return false; } World();  World(Configuration config); @Override Element toXml(Document doc, String id); @Override String fromXml(Element vnode); boolean satisfiesProposition(String proposition); }
World extends Vertex { public boolean satisfiesProposition(String proposition) { proposition = proposition.trim(); String[] props = propositions.split(","); for (String prop : props) if (proposition.equalsIgnoreCase(prop.trim())) return true; return false; } World();  World(Configuration config); @Override Element toXml(Document doc, String id); @Override String fromXml(Element vnode); boolean satisfiesProposition(String proposition); public String propositions; }