Enum Class Config.Props

java.lang.Object
java.lang.Enum<Config.Props>
it.unisa.diem.wordageddon_g16.utility.Config.Props
All Implemented Interfaces:
Serializable, Comparable<Config.Props>, Constable
Enclosing class:
Config

public static enum Config.Props extends Enum<Config.Props>
Enum che rappresenta le chiavi di configurazione supportate nel file config.properties.

Ogni elemento fornisce un alias sicuro per accedere ai valori corrispondenti tramite Config.get(Props).

Valori disponibili:
  • DB_URL → URL del database
  • PW_CHAR_MIN_LENGTH → lunghezza minima della password
  • USR_CHAR_MAX_LENGTH → lunghezza massima del nome utente
  • SESSION_FILE → percorso file sessione
  • INTERRUPTED_SESSION_FILE → percorso file sessione interrotta
  • DOCUMENTS_DIR → directory contenente i documenti del gioco
  • Enum Constant Details

    • DB_URL

      public static final Config.Props DB_URL
    • PW_CHAR_MIN_LENGTH

      public static final Config.Props PW_CHAR_MIN_LENGTH
    • USR_CHAR_MAX_LENGTH

      public static final Config.Props USR_CHAR_MAX_LENGTH
    • SESSION_FILE

      public static final Config.Props SESSION_FILE
    • INTERRUPTED_SESSION_FILE

      public static final Config.Props INTERRUPTED_SESSION_FILE
    • DOCUMENTS_DIR

      public static final Config.Props DOCUMENTS_DIR
  • Field Details

    • key

      private final String key
  • Constructor Details

    • Props

      private Props(String key)
      Costruttore di Props: costruisce l'enum associando la chiave stringa del file config.properties.
      Parameters:
      key - chiave testuale associata a una proprietà
  • Method Details

    • values

      public static Config.Props[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Config.Props valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • get

      public String get()