Class CommandWords


  • public class CommandWords
    extends java.lang.Object
    Cette classe a comme attribut un tableau de String contenant l'ensemble des commandes valides.
    Version:
    23/03/2020
    Author:
    Gabriel Leroux aidé des enseignements de M.Bureau
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String[] aValidCommands  
    • Constructor Summary

      Constructors 
      Constructor Description
      CommandWords()
      Constructor - initialise the command words.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getCommandList()
      Affiche toutes les commandes valides sur aGui.println
      boolean isCommand​(java.lang.String pString)
      Check whether a given String is a valid command word.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CommandWords

        public CommandWords()
        Constructor - initialise the command words.
    • Method Detail

      • isCommand

        public boolean isCommand​(java.lang.String pString)
        Check whether a given String is a valid command word.
        Parameters:
        pString - prend en paramètre une String
        Returns:
        true if a given string is a valid command, false if it isn't.
      • getCommandList

        public java.lang.String getCommandList()
        Affiche toutes les commandes valides sur aGui.println
        Returns:
        une String contenant la liste des commandes valides