Interface ContextFactory<T>

Type Parameters:
T - type of elements of created contexts.
All Known Implementing Classes:
TrieContext.Factory

public interface ContextFactory<T>
Factory of contexts, which provides convenient APIs to create contexts.
  • Method Details

    • getEmptyContext

      Context getEmptyContext()
      Returns:
      the empty context.
    • make

      Context make(T elem)
      Returns:
      the context with one element.
    • make

      Context make(T... elems)
      Returns:
      the context that consists of given elements.
    • makeLastK

      Context makeLastK(Context context, int k)
      Returns:
      a context with last k elements of given context.
    • append

      Context append(Context parent, T elem, int limit)
      Constructs a context by appending a context element to a parent context. The length of the resulting context will be restricted by given limit.
      Returns:
      the resulting context.