Interface Dictionary

All Known Subinterfaces:
Abbreviations, Punctuations, StopWords
All Known Implementing Classes:
EnglishDictionary, EnglishPunctuations, EnglishStopWords, SimpleDictionary

public interface Dictionary
A dictionary is a set of words in some natural language.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Returns true if this dictionary contains the specified word.
    Returns an iterator over the words in this dictionary.
    int
    Returns the number of words in this dictionary.
  • Method Details

    • contains

      boolean contains(String word)
      Returns true if this dictionary contains the specified word.
      Parameters:
      word - the query word.
      Returns:
      true if this dictionary contains the specified word.
    • size

      int size()
      Returns the number of words in this dictionary.
      Returns:
      the number of words in this dictionary.
    • iterator

      Iterator<String> iterator()
      Returns an iterator over the words in this dictionary.
      Returns:
      the iterator.