Enum Class OperatingSystems

java.lang.Object
java.lang.Enum<OperatingSystems>
dev.hydraulic.types.machines.OperatingSystems
All Implemented Interfaces:
MachineCompatibilityAspect, OperatingSystem, Serializable, Comparable<OperatingSystems>, Constable

public enum OperatingSystems extends Enum<OperatingSystems> implements OperatingSystem

An enumeration of well known, actively used operating systems.

This enum doesn't express information about sub-flavors of each OS, for example, it doesn't express what version, distribution, CPU architecture or (for Linux) C library is in use. To include these things use the Machine type instead.

The enum names here prefer to match the capitalization of the brand name rather than the capitalization rules for normal Java identifiers.

For ChromeOS and Android the vendor is listed as Google, even though technically the vendor could also be considered as the hardware vendor.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Various groupings of well known operating systems useful for compatibility testing purposes.

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Any OS that is able to legally use the Android trademark, meaning it either has passed the compliance tests or would definitely do if it were allowed.
    Google ChromeOS.
    FreeBSD.
    Apple's iconic mobile operating system.
    The variant of iOS that runs on iPads.
    Any desktop/server/embedded Linux distribution that isn't more accurately described by one of the other entries.
    Apple macOS 10+.
    NetBSD
    OpenBSD
    Solaris and any derivatives.
    Apple TV's operating system.
    Any other operating system that isn't known by this list.
    Apple Watch's operating system.
    Microsoft Windows.
    IBM zOS, a mainframe operating system.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Map<String,OperatingSystem>
    An unmodifiable map of lower case names and aliases of well known operating systems.
  • Method Summary

    Modifier and Type
    Method
    Description
    A set containing the identifier and any other strings that are widely used in the industry to identify this OS, all in lower case.
    Should return the display name of an operating system, suitable for presentation to humans.
    The operating system name in a form suitable for use as an identifier in code or filing systems, i.e.
    Returns the display name of the organization that makes this OS, or "Open source".
    Returns the enum constant of this class with the specified name.
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • Linux

      public static final OperatingSystems Linux
      Any desktop/server/embedded Linux distribution that isn't more accurately described by one of the other entries.
    • macOS

      public static final OperatingSystems macOS
      Apple macOS 10+. The identifier is mac and aliases are macos, osx and darwin. Although a pure Darwin system isn't technically the same as macOS, in practice nobody runs pure Darwin and thus it's always used as an alias for macOS.
    • Windows

      public static final OperatingSystems Windows
      Microsoft Windows. Aliases are win, win32 and win64.
    • Android

      public static final OperatingSystems Android
      Any OS that is able to legally use the Android trademark, meaning it either has passed the compliance tests or would definitely do if it were allowed. The vendor is "Google", not "Open source" or the actual distribution vendor and there are no aliases.
    • iOS

      public static final OperatingSystems iOS
      Apple's iconic mobile operating system. Also known as iphoneos.
    • iPadOS

      public static final OperatingSystems iPadOS
      The variant of iOS that runs on iPads. Not exactly the same and branded differently.
    • tvOS

      public static final OperatingSystems tvOS
      Apple TV's operating system. No aliases.
    • watchOS

      public static final OperatingSystems watchOS
      Apple Watch's operating system. No aliases.
    • FreeBSD

      public static final OperatingSystems FreeBSD
      FreeBSD.
    • NetBSD

      public static final OperatingSystems NetBSD
      NetBSD
    • OpenBSD

      public static final OperatingSystems OpenBSD
      OpenBSD
    • ChromeOS

      public static final OperatingSystems ChromeOS
      Google ChromeOS. The vendor is "Google" not "Open source". Also known as cros.
    • Solaris

      public static final OperatingSystems Solaris
      Solaris and any derivatives. The vendor is "Open source". Also known as illumos.
    • zOS

      public static final OperatingSystems zOS
      IBM zOS, a mainframe operating system. Also known as z/os.
    • UNKNOWN

      public static final OperatingSystems UNKNOWN
      Any other operating system that isn't known by this list. The vendor is "Unknown" and it's aliased by "unknown" and "other".
  • Field Details

    • ALIAS_MAP

      public static final Map<String,OperatingSystem> ALIAS_MAP
      An unmodifiable map of lower case names and aliases of well known operating systems.
  • Method Details

    • values

      public static OperatingSystems[] 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 OperatingSystems 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
    • getDisplayName

      public String getDisplayName()
      Description copied from interface: MachineCompatibilityAspect
      Should return the display name of an operating system, suitable for presentation to humans. The display name may have unusual capitalization, slashes in the middle of it etc.
      Specified by:
      getDisplayName in interface MachineCompatibilityAspect
    • getIdentifier

      public String getIdentifier()
      Description copied from interface: MachineCompatibilityAspect
      The operating system name in a form suitable for use as an identifier in code or filing systems, i.e. all lower case with no punctuation or symbols.
      Specified by:
      getIdentifier in interface MachineCompatibilityAspect
    • getAliases

      public Set<String> getAliases()
      Description copied from interface: MachineCompatibilityAspect
      A set containing the identifier and any other strings that are widely used in the industry to identify this OS, all in lower case. Unlike MachineCompatibilityAspect.getIdentifier(), the strings returned here may contain punctuation or space characters.
      Specified by:
      getAliases in interface MachineCompatibilityAspect
    • getVendor

      public String getVendor()
      Description copied from interface: MachineCompatibilityAspect
      Returns the display name of the organization that makes this OS, or "Open source".
      Specified by:
      getVendor in interface MachineCompatibilityAspect