Enum Class OS

java.lang.Object
java.lang.Enum<OS>
com.strobel.core.OS
All Implemented Interfaces:
Serializable, Comparable<OS>, Constable

public enum OS extends Enum<OS>
  • Enum Constant Details

    • WINDOWS_NT

      public static final OS WINDOWS_NT
    • WINDOWS_95

      public static final OS WINDOWS_95
    • WINDOWS_98

      public static final OS WINDOWS_98
    • WINDOWS_2000

      public static final OS WINDOWS_2000
    • WINDOWS_VISTA

      public static final OS WINDOWS_VISTA
    • WINDOWS_7

      public static final OS WINDOWS_7
    • WINDOWS_OTHER

      public static final OS WINDOWS_OTHER
    • SOLARIS

      public static final OS SOLARIS
    • LINUX

      public static final OS LINUX
    • HP_UX

      public static final OS HP_UX
    • IBM_AIX

      public static final OS IBM_AIX
    • SGI_IRIX

      public static final OS SGI_IRIX
    • SUN_OS

      public static final OS SUN_OS
    • COMPAQ_TRU64_UNIX

      public static final OS COMPAQ_TRU64_UNIX
    • MAC

      public static final OS MAC
    • FREE_BSD

      public static final OS FREE_BSD
    • OS2

      public static final OS OS2
    • COMPAQ_OPEN_VMS

      public static final OS COMPAQ_OPEN_VMS
    • OTHER

      public static final OS OTHER
      Unrecognized OS
  • Field Details

    • names

      private final String[] names
    • current

      private static OS current
  • Constructor Details

    • OS

      private OS(String... names)
  • 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
    • isWindows

      public boolean isWindows()
      Returns:
      true if this OS belongs to windows family
    • isUnix

      public boolean isUnix()
      Returns:
      true if this OS belongs to *nix family
    • get

      public static OS get(String osName)
      Parameters:
      osName - name of OS as returned by System.getProperty("os.name")
      Returns:
      OS for the specified osName
    • get

      public static OS get()
      Returns:
      OS on which this JVM is running