Package test

Class DictionaryManager

java.lang.Object
test.DictionaryManager

public class DictionaryManager extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    challenge(String... args)
    The challenge function takes in a variable number of arguments, and checks if the last argument is contained within any of the dictionaries.
    get()
    The get function is a static function that returns the singleton instance of DictionaryManager.
    static int
    The getSize function returns the size of the booksDictionaries array.
    boolean
    query(String... args)
    The query function takes in a variable number of arguments, and returns true if the last argument is found in any of the dictionaries.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • query

      public boolean query(String... args)
      The query function takes in a variable number of arguments, and returns true if the last argument is found in any of the dictionaries.
      Parameters:
      args - Pass in a variable number of arguments and the last one is the word to check
      Returns:
      True if the word is in any of the books, otherwise it returns false
    • challenge

      public boolean challenge(String... args)
      The challenge function takes in a variable number of arguments, and checks if the last argument is contained within any of the dictionaries.
      Parameters:
      args - Pass in a variable number of arguments and the last one is the word to check
      Returns:
      True if the word is found in any of the dictionaries, and false otherwise
    • getSize

      public static int getSize()
      The getSize function returns the size of the booksDictionaries array.
      Returns:
      The size of the booksdictionaries arraylist
    • get

      public static DictionaryManager get()
      The get function is a static function that returns the singleton instance of DictionaryManager. If no instance exists, it creates one and then returns it.
      Returns:
      A dictionarymanager object