@Test public void testTrieCheckInLessSimple() { final String toBeChecked = "Test-gsgd42gtegzrkeifhze-42k fefsief"; final Elem bBis = this.trie.check(toBeChecked); Assert.assertNotNull(bBis); Assert.assertEquals(this.b, bBis); }
public T check(final String aString) { final char[] chars = aString.toCharArray(); for (int i = 0; i < chars.length; i++) { final Node<T> root = this.roots.get(chars[i]); if (root != null) { final T res = root.check(chars, i); if (res != null) { return res; } } } return null; }
Trie { public T check(final String aString) { final char[] chars = aString.toCharArray(); for (int i = 0; i < chars.length; i++) { final Node<T> root = this.roots.get(chars[i]); if (root != null) { final T res = root.check(chars, i); if (res != null) { return res; } } } return null; } }
Trie { public T check(final String aString) { final char[] chars = aString.toCharArray(); for (int i = 0; i < chars.length; i++) { final Node<T> root = this.roots.get(chars[i]); if (root != null) { final T res = root.check(chars, i); if (res != null) { return res; } } } return null; } Trie(); }
Trie { public T check(final String aString) { final char[] chars = aString.toCharArray(); for (int i = 0; i < chars.length; i++) { final Node<T> root = this.roots.get(chars[i]); if (root != null) { final T res = root.check(chars, i); if (res != null) { return res; } } } return null; } Trie(); void insert(final T elem); Set<T> checkAll(final String aString); T check(final String aString); Set<T> getAll(); void clear(); }
Trie { public T check(final String aString) { final char[] chars = aString.toCharArray(); for (int i = 0; i < chars.length; i++) { final Node<T> root = this.roots.get(chars[i]); if (root != null) { final T res = root.check(chars, i); if (res != null) { return res; } } } return null; } Trie(); void insert(final T elem); Set<T> checkAll(final String aString); T check(final String aString); Set<T> getAll(); void clear();  }