Package dev.prozilla.pine.common.system
Enum Class Platform
- All Implemented Interfaces:
Serializable,Comparable<Platform>,Constable
Represents the platforms supported by Pine.
This is a wrapper for Platform.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumRepresents the architectures supported by Pine.Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionstatic Platformget()Returns the platform Pine is running on.static Platform.ArchitectureReturns the architecture Pine is running on.static StringReturns the descriptor of the platform and architecture in the formatplatform/architecture.Returns the identifier of this platformgetName()Returns the name of this platformstatic StringgetPersistentDataPath(String subDirectory) static StringgetPersistentDataPath(String subDirectory, boolean createDirectories) abstract StringgetUserPath(String userHome, String separator) booleanChecks if this is the current platform.static booleanChecks if the current platform is supported by Pine.static booleanisUnix()Checks if the current platform is Unix-based.static StringmapLibraryNameBundled(String name) static Platformstatic Platform.ArchitectureparseArchitecture(String input) static PlatformReturns the enum constant of this class with the specified name.static Platform[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
FREEBSD
-
LINUX
-
MACOS
-
WINDOWS
-
-
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
-
getIdentifier
Returns the identifier of this platform- Returns:
- The identifier of this platform
-
getName
Returns the name of this platform- Returns:
- The name of this platform
-
isCurrent
public boolean isCurrent()Checks if this is the current platform.- Returns:
trueif this is the current platform.
-
getUserPath
-
getPersistentDataPath
-
getPersistentDataPath
-
get
Returns the platform Pine is running on.- Returns:
- The current platform, or
nullif the platform is not supported.
-
getArchitecture
Returns the architecture Pine is running on.- Returns:
- The current architecture, or
nullif the architecture is not supported.
-
getDescriptor
Returns the descriptor of the platform and architecture in the formatplatform/architecture.- Returns:
- The descriptor of the platform and architecture.
-
isUnix
public static boolean isUnix()Checks if the current platform is Unix-based.- Returns:
trueif the current platform is Unix-based.
-
isSupported
public static boolean isSupported()Checks if the current platform is supported by Pine.- Returns:
trueif the current platform is supported by Pine.
-
mapLibraryNameBundled
-
parse
-
parseArchitecture
-