|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<Platform>
edu.wisc.ssec.mcidasv.startupmanager.Platform
public enum Platform
Enum Constant Summary | |
---|---|
UNIXLIKE
Instance of unix-specific platform information. |
|
WINDOWS
Instance of windows-specific platform information. |
Field Summary | |
---|---|
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. |
Method Summary | |
---|---|
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 Platform |
valueOf(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, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final Platform UNIXLIKE
public static final Platform WINDOWS
Field Detail |
---|
private String userDirectory
private String userPrefs
private final String defaultPrefs
private final String newLine
private final String pathSeparator
private int availableMemory
Method Detail |
---|
public static Platform[] values()
for (Platform c : Platform.values()) System.out.println(c);
public static 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 name
NullPointerException
- if the argument is nullpublic void setUserDirectory(String path)
path
- New path. Cannot be null
.public void setAvailableMemory(String megabytes)
megabytes
must be
greater than or equal to zero.
megabytes
- Memory in megabytes
NullPointerException
- if megabytes
is null
.
IllegalArgumentException
- if megabytes
is less than
zero or does not represent an integer.StartupManager.getArgs(boolean, boolean, java.lang.String[], java.util.Properties)
public String getUserDirectory()
public String getUserFile(String filename)
filename
- Filename within the userpath
. Cannot be
null
, but does not need to be a filename that already exists
within the userpath
.
public String getUserBundles()
public int getAvailableMemory()
public String getUserPrefs()
public String getDefaultPrefs()
OptionMaster.normalizeUserDirectory()
public String getNewLine()
public String toString()
toString
in class Enum<Platform>
[Platform@HASHCODE: defaultPrefs=..., userDirectory=...,
userPrefs=...]
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |