- All Implemented Interfaces:
MachineCompatibilityAspect,OperatingSystem,Serializable,Comparable<OperatingSystems>,Constable
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 ClassesModifier and TypeClassDescriptionstatic classVarious 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 ConstantsEnum ConstantDescriptionAny 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+.NetBSDOpenBSDSolaris 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
FieldsModifier and TypeFieldDescriptionstatic final Map<String,OperatingSystem> An unmodifiable map of lower case names and aliases of well known operating systems. -
Method Summary
Modifier and TypeMethodDescriptionA set containing theidentifierand 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".static OperatingSystemsReturns the enum constant of this class with the specified name.static OperatingSystems[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
Linux
Any desktop/server/embedded Linux distribution that isn't more accurately described by one of the other entries. -
macOS
Apple macOS 10+. The identifier ismacand aliases aremacos,osxanddarwin. 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
Microsoft Windows. Aliases arewin,win32andwin64. -
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
Apple's iconic mobile operating system. Also known asiphoneos. -
iPadOS
The variant of iOS that runs on iPads. Not exactly the same and branded differently. -
tvOS
Apple TV's operating system. No aliases. -
watchOS
Apple Watch's operating system. No aliases. -
FreeBSD
FreeBSD. -
NetBSD
NetBSD -
OpenBSD
OpenBSD -
ChromeOS
Google ChromeOS. The vendor is "Google" not "Open source". Also known ascros. -
Solaris
Solaris and any derivatives. The vendor is "Open source". Also known asillumos. -
zOS
IBM zOS, a mainframe operating system. Also known asz/os. -
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
An unmodifiable map of lower case names and aliases of well known operating systems.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
getDisplayName
Description copied from interface:MachineCompatibilityAspectShould 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:
getDisplayNamein interfaceMachineCompatibilityAspect
-
getIdentifier
Description copied from interface:MachineCompatibilityAspectThe 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:
getIdentifierin interfaceMachineCompatibilityAspect
-
getAliases
Description copied from interface:MachineCompatibilityAspectA set containing theidentifierand any other strings that are widely used in the industry to identify this OS, all in lower case. UnlikeMachineCompatibilityAspect.getIdentifier(), the strings returned here may contain punctuation or space characters.- Specified by:
getAliasesin interfaceMachineCompatibilityAspect
-
getVendor
Description copied from interface:MachineCompatibilityAspectReturns the display name of the organization that makes this OS, or "Open source".- Specified by:
getVendorin interfaceMachineCompatibilityAspect
-