java.lang.Object
test.DictionaryManager
-
Method Summary
Modifier and TypeMethodDescriptionbooleanThe challenge function takes in a variable number of arguments, and checks if the last argument is contained within any of the dictionaries.static DictionaryManagerget()The get function is a static function that returns the singleton instance of DictionaryManager.static intgetSize()The getSize function returns the size of the booksDictionaries array.booleanThe query function takes in a variable number of arguments, and returns true if the last argument is found in any of the dictionaries.
-
Method Details
-
query
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
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
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
-