Package utils

Class OSDetector

java.lang.Object
utils.OSDetector

public class OSDetector extends Object
This class is used to detect the operating system.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final String
    The operating system name.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    Check if the operating system is Mac.
    static boolean
    Check if the operating system is Unix.
    static boolean
    Check if the operating system is Windows.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • OS

      private static final String OS
      The operating system name.
  • Constructor Details

    • OSDetector

      public OSDetector()
  • Method Details

    • isWindows

      public static boolean isWindows()
      Check if the operating system is Windows.
      Returns:
      true if the operating system is Windows, false otherwise.
    • isMac

      public static boolean isMac()
      Check if the operating system is Mac.
      Returns:
      true if the operating system is Mac, false otherwise.
    • isUnix

      public static boolean isUnix()
      Check if the operating system is Unix.
      Returns:
      true if the operating system is Unix, false otherwise.