Enum EOperatingSystem

    • Enum Constant Detail

      • AIX

        public static final EOperatingSystem AIX
        The value indicating the AIX operating system.
      • FREEBSD

        public static final EOperatingSystem FREEBSD
        The value indicating the FreeBSD operating system.
      • HPUX

        public static final EOperatingSystem HPUX
        The value indicating the HP-UX operating system.
      • LINUX

        public static final EOperatingSystem LINUX
        The value indicating the Linux operating system.
      • MACOS

        public static final EOperatingSystem MACOS
        The value indicating the Mac OS X operating system.
      • SOLARIS

        public static final EOperatingSystem SOLARIS
        The value indicating the Solaris operating system.
      • WINDOWS

        public static final EOperatingSystem WINDOWS
        The value indicating the Windows operating system.
      • ZOS

        public static final EOperatingSystem ZOS
        The value indicating the z/OS operating system.
      • UNKNOWN

        public static final EOperatingSystem UNKNOWN
        The value indicating an unknown operating system.
    • Method Detail

      • values

        public static EOperatingSystem[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (EOperatingSystem c : EOperatingSystem.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static EOperatingSystem valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
        NullPointerException - if the argument is null
      • isUnixBased

        public boolean isUnixBased()
        Indicates whether the provided operating system is UNIX-based. UNIX-based operating systems include:
        • AIX
        • FreeBSD
        • HP-UX
        • Linux
        • Mac OS X
        • Solaris
        Returns:
        true if the provided operating system is UNIX-based, or false if not.
      • isWindowsBased

        public boolean isWindowsBased()
        Indicates whether the provided operating system is Windows-based. Windows-based operating systems include:
        • Windows
        Returns:
        true if the provided operating system is Windows-based, or false if not.
      • isMacOSBased

        public boolean isMacOSBased()
        Indicates whether the provided operating system is MacOS-based. MacOS-based operating systems include:
        • MacOS
        Returns:
        true if the provided operating system is MacOS-based, or false if not.
      • isCurrentOS

        public boolean isCurrentOS()
        Returns:
        true if the this OS is the current OS.
      • getNewLineMode

        @Nonnull
        public ENewLineMode getNewLineMode()
        Returns:
        The newline mode matching this operating system.
      • forName

        @Nonnull
        public static EOperatingSystem forName​(@Nullable
                                               String sOSName)
        Retrieves the operating system for the provided name. The name provided should come from the os.name system property.
        Parameters:
        sOSName - The name for which to retrieve the corresponding operating system.
        Returns:
        The operating system for the provided name. If the operating system could not be determined, UNKNOWN is returned and never null.
      • getCurrentOSName

        @Nullable
        public static String getCurrentOSName()
        Returns:
        The name of the current operating system.
      • getCurrentOSVersion

        @Nullable
        public static String getCurrentOSVersion()
        Returns:
        The version of the current operating system.