/** * Constructs a new automaton that accepts the complement of the language of this automaton. * The input automaton is unmodified. */ public FA complement() { FA f = (FA) clone(); Set s = new HashSet(); s.addAll(f.states); s.removeAll(f.accept); f.accept = s; return f; }