All Superinterfaces:
PrefixTrie
All Known Implementing Classes:
ReversePrefixTrie

public interface SuffixTrie extends PrefixTrie
An extension of the prefix trie. This structure can perform fast substring matches.
  • Method Details

    • endsWith

      Collection<String> endsWith(String suffix, int limit)
      Try to find strings which end with suffix. Matching strings are always in arbitrary order.
      Parameters:
      suffix - to look for
      limit - maximum number of found strings
      Returns:
      collection of words with the same suffix
    • isSuffix

      boolean isSuffix(String suffix)
      Checks if suffix is present in this trie.
      Parameters:
      suffix - to check
      Returns:
      true if suffix exists