Package test

Class DictionaryCommunication

java.lang.Object
test.DictionaryCommunication

public class DictionaryCommunication extends Object
  • Method Details

    • checkIfWordValid

      public boolean checkIfWordValid(String word)
      The checkIfWordValid function takes in a String word and checks if it is valid.
      Parameters:
      word - Send the word to the server
      Returns:
      True if the word is valid, false otherwise
    • close

      public void close()
      The close function closes the server socket.
    • getInstance

      public static DictionaryCommunication getInstance()
      The getInstance function is a singleton function that returns the same instance of DictionaryCommunication every time it is called. This allows for multiple classes to use the same instance of DictionaryCommunication, and thus access the same dictionary.
      Returns:
      An instance of the dictionarycommunication class