Enum Class OS

java.lang.Object
java.lang.Enum<OS>
xyz.gmitch215.socketmc.retriever.OS
All Implemented Interfaces:
Serializable, Comparable<OS>, Constable

public enum OS extends Enum<OS>
Represents all supported operating systems that the client can run on.
  • Enum Constant Details

    • LINUX

      public static final OS LINUX
      Any Linux distribution.
    • SOLARIS

      public static final OS SOLARIS
      Any BSD distribution.
    • WINDOWS

      public static final OS WINDOWS
      Any Windows distribution.
    • OSX

      public static final OS OSX
      Any Mac OSX distribution.
    • UNKNOWN

      public static final OS UNKNOWN
      An unknown operating system.
  • Method Details

    • values

      public static OS[] 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 OS 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
    • getName

      @NotNull public @NotNull String getName()
      Gets the name of the operating system.
      Returns:
      The name of the operating system.
    • byName

      @NotNull public static @NotNull OS byName(@NotNull @NotNull String name)
      Gets the operating system by its name.
      Parameters:
      name - The name of the operating system
      Returns:
      The operating system found, or UNKNOWN if not found
    • current

      public static OS current()
      Gets the current operating system that this JVM is running on.
      Returns:
      The current operating system