|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.wisc.ssec.mcidasv.startupmanager.options.OptionMaster
public class OptionMaster
Nested Class Summary | |
---|---|
static class |
OptionMaster.OptionPlatform
Option s can be either platform-specific or applicable to all
platforms. |
static class |
OptionMaster.Type
The different types of Option s. |
static class |
OptionMaster.Visibility
Different ways that an Option might be displayed. |
Field Summary | |
---|---|
Object[][] |
blahblah
|
private static OptionMaster |
instance
|
private Map<String,? extends Option> |
optionMap
Maps an option ID to the corresponding object. |
Constructor Summary | |
---|---|
OptionMaster()
|
Method Summary | |
---|---|
private Map<String,Option> |
buildOptions(Object[][] options)
Creates the specified options and returns a mapping of the option ID to the actual Option object. |
protected OptionMaster.OptionPlatform |
convertToOptionPlatform()
Converts a OptionMaster.OptionPlatform to its corresponding
OptionMaster.OptionPlatform type. |
Collection<Option> |
getAllOptions()
Returns all the available startup manager options. |
BooleanOption |
getBooleanOption(String id)
Searches optionMap for the BooleanOption that
corresponds with the given id . |
DirectoryOption |
getDirectoryOption(String id)
Searches optionMap for the DirectoryOption that
corresponds with the given id . |
static OptionMaster |
getInstance()
|
LoggerLevelOption |
getLoggerLevelOption(String id)
Searches optionMap for the LoggerLevelOption that
corresponds with the given id . |
MemoryOption |
getMemoryOption(String id)
Searches optionMap for the MemoryOption that
corresponds with the given id . |
private Option |
getOption(String id)
Returns the Option mapped to id . |
SliderOption |
getSliderOption(String id)
Searches optionMap for the SliderOption that
corresponds with the given id . |
TextOption |
getTextOption(String id)
Searches optionMap for the TextOption that
corresponds with the given id . |
private void |
normalizeUserDirectory()
|
List<Option> |
optionsByPlatform(Collection<OptionMaster.OptionPlatform> platforms)
Returns the Options applicable to the given
OptionPlatforms . |
List<Option> |
optionsByType(Collection<OptionMaster.Type> types)
Returns the Options that match the given
Types . |
List<Option> |
optionsByVisibility(Collection<OptionMaster.Visibility> visibilities)
Returns the Options that match the given levels of
visibility . |
void |
readStartup()
|
void |
writeStartup()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public final Object[][] blahblah
private Map<String,? extends Option> optionMap
private static OptionMaster instance
Constructor Detail |
---|
public OptionMaster()
Method Detail |
---|
public static OptionMaster getInstance()
private Map<String,Option> buildOptions(Object[][] options)
Option
object.
options
- An array specifying the Option
s to be built.
Option
.
AssertionError
- if the option array contained an entry that
this method cannot build.protected OptionMaster.OptionPlatform convertToOptionPlatform()
OptionMaster.OptionPlatform
to its corresponding
OptionMaster.OptionPlatform
type.
OptionPlatform
type.
AssertionError
- if StartupManager.getPlatform()
returned something that this method cannot convert.private Option getOption(String id)
Option
mapped to id
.
id
- The ID whose associated Option
is to be returned.
Option
associated with id
, or
null
if there was no association.getMemoryOption(java.lang.String)
,
getBooleanOption(java.lang.String)
,
getDirectoryOption(java.lang.String)
,
getSliderOption(java.lang.String)
,
getTextOption(java.lang.String)
,
getLoggerLevelOption(java.lang.String)
public MemoryOption getMemoryOption(String id)
optionMap
for the MemoryOption
that
corresponds with the given id
.
id
- Identifier for the desired MemoryOption
.
Should not be null
.
MemoryOption
that corresponds to id
or null
.public BooleanOption getBooleanOption(String id)
optionMap
for the BooleanOption
that
corresponds with the given id
.
id
- Identifier for the desired BooleanOption
.
Should not be null
.
BooleanOption
that corresponds to id
or null
.public DirectoryOption getDirectoryOption(String id)
optionMap
for the DirectoryOption
that
corresponds with the given id
.
id
- Identifier for the desired DirectoryOption
.
Should not be null
.
DirectoryOption
that corresponds to
id
or null
.public SliderOption getSliderOption(String id)
optionMap
for the SliderOption
that
corresponds with the given id
.
id
- Identifier for the desired SliderOption
.
Should not be null
.
SliderOption
that corresponds to id
or null
.public TextOption getTextOption(String id)
optionMap
for the TextOption
that
corresponds with the given id
.
id
- Identifier for the desired TextOption
.
Should not be null
.
TextOption
that corresponds to id
or null
.public LoggerLevelOption getLoggerLevelOption(String id)
optionMap
for the LoggerLevelOption
that
corresponds with the given id
.
id
- Identifier for the desired LoggerLevelOption
.
Should not be null
.
LoggerLevelOption
that corresponds to id
or null
.public Collection<Option> getAllOptions()
Collection
.public List<Option> optionsByPlatform(Collection<OptionMaster.OptionPlatform> platforms)
Options
applicable to the given
OptionPlatforms
.
platforms
- Desired platforms. Cannot be null
.
List
of {code Option}-s applicable to
platforms
or an empty List
.public List<Option> optionsByType(Collection<OptionMaster.Type> types)
Options
that match the given
Types
.
types
- Desired Option
types. Cannot be null
.
List
of Option
-s that match the given
types or an empty List
.public List<Option> optionsByVisibility(Collection<OptionMaster.Visibility> visibilities)
Options
that match the given levels of
visibility
.
visibilities
- Desired visibility levels. Cannot be null
.
List
of Option
-s that match the given
visibility levels or an empty List
.private void normalizeUserDirectory()
public void readStartup()
public void writeStartup()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |