Enum Platform

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<Platform>

    public enum Platform
    extends java.lang.Enum<Platform>
    An enumeration of the platforms that are supported by Attach.
    Since:
    3.0.0
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      ANDROID
      The android platform provides implementations to access the applicable services available on Android.
      DESKTOP
      The desktop platform provides implementations to access the applicable services available on desktop operating systems (such as Windows, Linux, and Mac OS).
      IOS
      The ios platform provides implementations to access the applicable services available on iOS.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static Platform getCurrent()
      Returns the current platform that the code is being executed on.
      java.lang.String getName()  
      static boolean isAndroid()
      Returns whether the current platform is android.
      static boolean isDesktop()
      Returns whether the current platform is desktop.
      static boolean isIOS()
      Returns whether the current platform is iOS.
      static Platform valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static Platform[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

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

      • DESKTOP

        public static final Platform DESKTOP
        The desktop platform provides implementations to access the applicable services available on desktop operating systems (such as Windows, Linux, and Mac OS).
      • ANDROID

        public static final Platform ANDROID
        The android platform provides implementations to access the applicable services available on Android.
      • IOS

        public static final Platform IOS
        The ios platform provides implementations to access the applicable services available on iOS.
    • Method Detail

      • values

        public static Platform[] 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 (Platform c : Platform.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Platform valueOf​(java.lang.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:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • getCurrent

        public static Platform getCurrent()
        Returns the current platform that the code is being executed on. This obviously won't change during the execution of the code. The current platform is obtained by querying the System Property javafx.platform. If no such property exists, the current platform is set to be the DESKTOP platform.
        Returns:
        The current Platform.
      • isDesktop

        public static boolean isDesktop()
        Returns whether the current platform is desktop.
        Returns:
        True if the current platform is desktop.
      • isAndroid

        public static boolean isAndroid()
        Returns whether the current platform is android.
        Returns:
        True if the current platform is android.
      • isIOS

        public static boolean isIOS()
        Returns whether the current platform is iOS.
        Returns:
        True if the current platform is iOS.
      • getName

        public final java.lang.String getName()