public static enum StartupManager.Platform extends Enum<StartupManager.Platform>
| Enum Constant and Description |
|---|
UNIXLIKE
Instance of unix-specific platform information.
|
WINDOWS
Instance of windows-specific platform information.
|
| Modifier and Type | Field and Description |
|---|---|
private int |
availableMemory
Total amount of memory avilable in megabytes
|
private String |
defaultPrefs
Path to the preference file that ships with McIDAS-V.
|
private String |
newLine
Holds the platform's representation of a new line.
|
private String |
pathSeparator
Directory delimiter for the current platform.
|
private String |
userDirectory
Path to the user's "userpath" directory.
|
private String |
userPrefs
The path to the user's copy of the startup preferences.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getAvailableMemory()
Returns the amount of available memory in megabytes
|
String |
getDefaultPrefs()
Returns the path of the startup preferences included in the McIDAS-V
distribution.
|
String |
getNewLine()
Returns the platform's notion of a new line.
|
String |
getUserBundles() |
String |
getUserDirectory()
Returns the path to the user's "userpath" directory.
|
String |
getUserFile(String filename)
Returns the path to a file in the user's "userpath" directory
|
String |
getUserPrefs()
Returns the path of user's copy of the startup preferences.
|
void |
setAvailableMemory(String megabytes)
Sets the amount of available memory.
|
void |
setUserDirectory(String path)
Sets the path to the user's userpath directory explicitly.
|
String |
toString()
Returns a brief summary of the platform specific file locations.
|
static StartupManager.Platform |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static StartupManager.Platform[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final StartupManager.Platform UNIXLIKE
public static final StartupManager.Platform WINDOWS
private String userDirectory
private final String defaultPrefs
private final String pathSeparator
private int availableMemory
public static StartupManager.Platform[] values()
for (StartupManager.Platform c : StartupManager.Platform.values()) System.out.println(c);
public static StartupManager.Platform valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant
with the specified nameNullPointerException - if the argument is nullpublic void setUserDirectory(String path)
path - New path.public void setAvailableMemory(String megabytes)
megabytes must be
greater than or equal to zero.megabytes - Memory in megabytesNullPointerException - if megabytes is null.IllegalArgumentException - if megabytes is less than
zero or does not represent an integer.StartupManager#getArgs(String[], Properties)public String getUserDirectory()
public String getUserFile(String filename)
filename - public String getUserBundles()
public int getAvailableMemory()
public String getUserPrefs()
public String getDefaultPrefs()
OptionMaster.normalizeUserDirectory()public String getNewLine()
public String toString()
toString in class Enum<StartupManager.Platform>[Platform@HASHCODE: defaultPrefs=..., userDirectory=...,
userPrefs=...]