@Test public void testContainsEpsilon() { assertFalse(aOrb.containsEpsilon()); Epsilon epsilon = Epsilon.get(); ERE aOrepsilon = Or.get(new ArrayList<ERE>(Arrays.asList(a, epsilon))); assertTrue(aOrepsilon.containsEpsilon()); }
@Override public boolean containsEpsilon() { for(ERE child : children) { if(child.containsEpsilon()) { return true; } } return false; }
Or extends ERE { @Override public boolean containsEpsilon() { for(ERE child : children) { if(child.containsEpsilon()) { return true; } } return false; } }
Or extends ERE { @Override public boolean containsEpsilon() { for(ERE child : children) { if(child.containsEpsilon()) { return true; } } return false; } private  Or(List<ERE> children); }
Or extends ERE { @Override public boolean containsEpsilon() { for(ERE child : children) { if(child.containsEpsilon()) { return true; } } return false; } 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 boolean containsEpsilon() { for(ERE child : children) { if(child.containsEpsilon()) { return true; } } return false; } 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);  }