public static class GenericTrieMatcher.GenericTrieMatch<K> extends Object
TrieMatcher#match(String) to represent a match.TrieMatcher| Modifier and Type | Method and Description |
|---|---|
int |
getPosition()
The position of where the match was in the source.
|
List<K> |
getReplacement()
The replacement for word in the trie that matched.
|
List<K> |
getWord()
The word in the trie that matched.
|
public int getPosition()
Trie trie = new Trie(String[]{"x"}, String[]{"Y"});
TrieMatch match = trie.match("abcxdef");
Assert.assertEquals(3, match.getPosition());
public List<K> getWord()
Trie trie = new Trie(String[]{"x"}, String[]{"Y"});
TrieMatch match = trie.match("abcxdef");
Assert.assertEquals("x", match.getWord());
Copyright (c) 2016-2017, Salesforce.com, Inc. All rights reserved. Licensed under the BSD 3-Clause license. For full license text, see the LICENSE.txt file in the repository.