@Test public void testShadok() { final int lgMax = 5; final String[] shadokAlph = new String[] { new String("GA"), new String("BU"), new String("ZO"), new String("MEU") }; List<List<String>> shadokSentences = new ArrayList<List<String>>(); for (int lg=0; lg<lgMax; ++lg) { final List<List<String>> newTab = new ArrayList<List<String>>(); newTab.add(new ArrayList<String>()); for (final String element : shadokAlph) { for (final List<String> sentence : shadokSentences) { final List<String> newSentence = new ArrayList<String>(sentence); newSentence.add(element); newTab.add(newSentence); } } shadokSentences = newTab; } final ExecutionVisitor<String> ev = new ExecutionVisitor<String>(); for (int i = 0; i < shadokSentences.size(); ++i) { for (List<String> shadokSentence : shadokSentences) { ev.setList(shadokSentences.get(i)); new SequencesComparator<String>(shadokSentences.get(i), shadokSentence).getScript().visit(ev); final StringBuilder concat = new StringBuilder(); for (final String s : shadokSentence) { concat.append(s); } Assert.assertEquals(concat.toString(), ev.getString()); } } }
public EditScript<T> getScript() { final EditScript<T> script = new EditScript<T>(); buildScript(0, sequence1.size(), 0, sequence2.size(), script); return script; }
SequencesComparator { public EditScript<T> getScript() { final EditScript<T> script = new EditScript<T>(); buildScript(0, sequence1.size(), 0, sequence2.size(), script); return script; } }
SequencesComparator { public EditScript<T> getScript() { final EditScript<T> script = new EditScript<T>(); buildScript(0, sequence1.size(), 0, sequence2.size(), script); return script; } SequencesComparator(final List<T> sequence1, final List<T> sequence2);  SequencesComparator(final List<T> sequence1, final List<T> sequence2, final Equator<? super T> equator); }
SequencesComparator { public EditScript<T> getScript() { final EditScript<T> script = new EditScript<T>(); buildScript(0, sequence1.size(), 0, sequence2.size(), script); return script; } SequencesComparator(final List<T> sequence1, final List<T> sequence2);  SequencesComparator(final List<T> sequence1, final List<T> sequence2, final Equator<? super T> equator); EditScript<T> getScript(); }
SequencesComparator { public EditScript<T> getScript() { final EditScript<T> script = new EditScript<T>(); buildScript(0, sequence1.size(), 0, sequence2.size(), script); return script; } SequencesComparator(final List<T> sequence1, final List<T> sequence2);  SequencesComparator(final List<T> sequence1, final List<T> sequence2, final Equator<? super T> equator); EditScript<T> getScript();  }