@Test public void testDerive() { Symbol c = Symbol.get("c"); Epsilon epsilon = Epsilon.get(); Empty empty = Empty.get(); assertEquals(epsilon, aOrb.derive(a)); assertEquals(epsilon, aOrb.derive(b)); assertEquals(empty, aOrb.derive(c)); }
@Override public ERE derive(Symbol s) { ArrayList<ERE> orChildren = new ArrayList<ERE>(children.size()); for(ERE child : children) { orChildren.add(child.derive(s)); } return Or.get(orChildren); }
Or extends ERE { @Override public ERE derive(Symbol s) { ArrayList<ERE> orChildren = new ArrayList<ERE>(children.size()); for(ERE child : children) { orChildren.add(child.derive(s)); } return Or.get(orChildren); } }
Or extends ERE { @Override public ERE derive(Symbol s) { ArrayList<ERE> orChildren = new ArrayList<ERE>(children.size()); for(ERE child : children) { orChildren.add(child.derive(s)); } return Or.get(orChildren); } private  Or(List<ERE> children); }
Or extends ERE { @Override public ERE derive(Symbol s) { ArrayList<ERE> orChildren = new ArrayList<ERE>(children.size()); for(ERE child : children) { orChildren.add(child.derive(s)); } return Or.get(orChildren); } private  Or(List<ERE> children); static ERE get(List<ERE> children); ERE simplify(); @Override EREType getEREType(); @Override String toString(); @Override ERE copy(); @Override boolean containsEpsilon(); @Override ERE derive(Symbol s); }
Or extends ERE { @Override public ERE derive(Symbol s) { ArrayList<ERE> orChildren = new ArrayList<ERE>(children.size()); for(ERE child : children) { orChildren.add(child.derive(s)); } return Or.get(orChildren); } private  Or(List<ERE> children); static ERE get(List<ERE> children); ERE simplify(); @Override EREType getEREType(); @Override String toString(); @Override ERE copy(); @Override boolean containsEpsilon(); @Override ERE derive(Symbol s);  }