- java.lang.Object
-
- java.lang.Enum<Platform>
-
- com.gluonhq.attach.util.Platform
-
-
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.
-
-
-
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 namejava.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.- 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()
-
-