Enum Class Environment

java.lang.Object
java.lang.Enum<Environment>
com.avrix.enums.Environment
All Implemented Interfaces:
Serializable, Comparable<Environment>, Constable

public enum Environment extends Enum<Environment>
An enumeration representing the execution environment, such as server, client, etc.
  • Enum Constant Details

    • CLIENT

      public static final Environment CLIENT
      Client environment.
    • SERVER

      public static final Environment SERVER
      Server environment.
    • BOTH

      public static final Environment BOTH
      Both client and server environments.
  • Method Details

    • values

      public static Environment[] 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 Environment 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
    • getValue

      public String getValue()
      Gets the string representation of the environment.
      Returns:
      the string representation of the environment
    • fromString

      public static Environment fromString(String text)
      Converts a string to the corresponding Environment enum value.
      Parameters:
      text - the string to convert
      Returns:
      the corresponding Environment enum value. If the value could not be determined, it returns BOTH