Interface SuffixTree<T>

Type Parameters:
T - type of value
All Known Implementing Classes:
GenericUkkonenSuffixTree

public interface SuffixTree<T>
Simple generic key value suffix tree contract. Keys are strings values are generic and their insertion depends on the implementation.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    contains(String pattern)
    True if the provided substring is present in the suffix tree.
    Returns the values for each string matching the provided pattern.
    int
    The total nodes of this tree
    int
    The total size of the text held by this tree.
    int
    Total values inserted with their string keys into the tree.
  • Method Details

    • findAllOccurrences

      Collection<T> findAllOccurrences(String pattern)
      Returns the values for each string matching the provided pattern.
      Parameters:
      pattern - string
      Returns:
      list of values
    • contains

      boolean contains(String pattern)
      True if the provided substring is present in the suffix tree.
      Parameters:
      pattern - string
      Returns:
      true if present else false
    • textSize

      int textSize()
      The total size of the text held by this tree.
      Returns:
      text size
    • nodesCount

      int nodesCount()
      The total nodes of this tree
      Returns:
      node count
    • valuesCount

      int valuesCount()
      Total values inserted with their string keys into the tree.
      Returns:
      value count