@Test public void testGetValueForExactKey() throws Exception { ConcurrentSuffixTree<Integer> tree = newConcurrentSuffixTreeForUnitTests(); tree.put("BANANA", 1); tree.put("BANDANA", 2); assertEquals(Integer.valueOf(1), tree.getValueForExactKey("BANANA")); assertEquals(Integer.valueOf(2), tree.getValueForExactKey("BANDANA")); assertNull(tree.getValueForExactKey("BAN")); assertNull(tree.getValueForExactKey("ANA")); }
@Override public O getValueForExactKey(CharSequence key) { String keyString = CharSequences.toString(key); return valueMap.get(keyString); }
ConcurrentSuffixTree implements SuffixTree<O>, PrettyPrintable, Serializable { @Override public O getValueForExactKey(CharSequence key) { String keyString = CharSequences.toString(key); return valueMap.get(keyString); } }
ConcurrentSuffixTree implements SuffixTree<O>, PrettyPrintable, Serializable { @Override public O getValueForExactKey(CharSequence key) { String keyString = CharSequences.toString(key); return valueMap.get(keyString); } ConcurrentSuffixTree(NodeFactory nodeFactory); }
ConcurrentSuffixTree implements SuffixTree<O>, PrettyPrintable, Serializable { @Override public O getValueForExactKey(CharSequence key) { String keyString = CharSequences.toString(key); return valueMap.get(keyString); } ConcurrentSuffixTree(NodeFactory nodeFactory); @Override O put(CharSequence key, O value); @Override O putIfAbsent(CharSequence key, O value); @Override boolean remove(CharSequence key); @Override O getValueForExactKey(CharSequence key); @Override Iterable<CharSequence> getKeysEndingWith(CharSequence suffix); @Override Iterable<O> getValuesForKeysEndingWith(final CharSequence suffix); @Override Iterable<KeyValuePair<O>> getKeyValuePairsForKeysEndingWith(final CharSequence suffix); @Override Iterable<CharSequence> getKeysContaining(final CharSequence fragment); @Override Iterable<O> getValuesForKeysContaining(final CharSequence fragment); @Override Iterable<KeyValuePair<O>> getKeyValuePairsForKeysContaining(final CharSequence fragment); @Override int size(); @Override Node getNode(); }
ConcurrentSuffixTree implements SuffixTree<O>, PrettyPrintable, Serializable { @Override public O getValueForExactKey(CharSequence key) { String keyString = CharSequences.toString(key); return valueMap.get(keyString); } ConcurrentSuffixTree(NodeFactory nodeFactory); @Override O put(CharSequence key, O value); @Override O putIfAbsent(CharSequence key, O value); @Override boolean remove(CharSequence key); @Override O getValueForExactKey(CharSequence key); @Override Iterable<CharSequence> getKeysEndingWith(CharSequence suffix); @Override Iterable<O> getValuesForKeysEndingWith(final CharSequence suffix); @Override Iterable<KeyValuePair<O>> getKeyValuePairsForKeysEndingWith(final CharSequence suffix); @Override Iterable<CharSequence> getKeysContaining(final CharSequence fragment); @Override Iterable<O> getValuesForKeysContaining(final CharSequence fragment); @Override Iterable<KeyValuePair<O>> getKeyValuePairsForKeysContaining(final CharSequence fragment); @Override int size(); @Override Node getNode();  }