Class OptionMaster
java.lang.Object
edu.wisc.ssec.mcidasv.startupmanager.options.OptionMaster
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildOptions
(Object[][] options) Creates the specified options and returns a mapping of the option ID to the actualOption
object.protected OptionMaster.OptionPlatform
Converts aPlatform
to its correspondingOptionMaster.OptionPlatform
type.Returns all the available startup manager options.getFileOption
(String id) static OptionMaster
private Option
Returns theOption
mapped toid
.getTextOption
(String id) static boolean
void
optionsByPlatform
(Collection<OptionMaster.OptionPlatform> platforms) Returns theOptions
applicable to the givenOptionPlatforms
.optionsByType
(Collection<OptionMaster.Type> types) optionsByVisibility
(Collection<OptionMaster.Visibility> visibilities) Returns theOptions
that match the given levels ofvisibility
.void
void
-
Field Details
-
logger
-
SET_PREFIX
- See Also:
-
EMPTY_STRING
- See Also:
-
QUOTE_STRING
- See Also:
-
QUOTE_CHAR
- See Also:
-
DEF_SCALING
- See Also:
-
blahblah
-
optionMap
Maps an option ID to the corresponding object. -
instance
-
-
Constructor Details
-
OptionMaster
public OptionMaster()
-
-
Method Details
-
getInstance
-
hasRetinaDisplay
-
buildOptions
Creates the specified options and returns a mapping of the option ID to the actualOption
object.- Parameters:
options
- An array specifying theOption
s to be built.- Returns:
- Mapping of ID to
Option
. - Throws:
AssertionError
- if the option array contained an entry that this method cannot build.
-
convertToOptionPlatform
Converts aPlatform
to its correspondingOptionMaster.OptionPlatform
type.- Returns:
- The current platform as a
OptionPlatform
type. - Throws:
AssertionError
- ifStartupManager.getPlatform()
returned something that this method cannot convert.
-
getOption
Returns theOption
mapped toid
.- Parameters:
id
- The ID whose associatedOption
is to be returned.- Returns:
- Either the
Option
associated withid
, ornull
if there was no association. - See Also:
-
getMemoryOption
- Parameters:
id
- Identifier for the desiredMemoryOption
. Should not benull
.- Returns:
- Either the
MemoryOption
that corresponds toid
ornull
.
-
getBooleanOption
- Parameters:
id
- Identifier for the desiredBooleanOption
. Should not benull
.- Returns:
- Either the
BooleanOption
that corresponds toid
ornull
.
-
getDirectoryOption
- Parameters:
id
- Identifier for the desiredDirectoryOption
. Should not benull
.- Returns:
- Either the
DirectoryOption
that corresponds toid
ornull
.
-
getSliderOption
- Parameters:
id
- Identifier for the desiredSliderOption
. Should not benull
.- Returns:
- Either the
SliderOption
that corresponds toid
ornull
.
-
getTextOption
- Parameters:
id
- Identifier for the desiredTextOption
. Should not benull
.- Returns:
- Either the
TextOption
that corresponds toid
ornull
.
-
getLoggerLevelOption
- Parameters:
id
- Identifier for the desiredLoggerLevelOption
. Should not benull
.- Returns:
- Either the
LoggerLevelOption
that corresponds toid
ornull
.
-
getFileOption
-
getAllOptions
Returns all the available startup manager options.- Returns:
- Either all available startup manager options or an empty
Collection
.
-
optionsByPlatform
Returns theOptions
applicable to the givenOptionPlatforms
.- Parameters:
platforms
- Desired platforms. Cannot benull
.- Returns:
- Either a
List
of {code Option}-s applicable toplatforms
or an emptyList
.
-
optionsByType
- Parameters:
types
- DesiredOption
types. Cannot benull
.- Returns:
- Either the
List
ofOption
-s that match the given types or an emptyList
.
-
optionsByVisibility
Returns theOptions
that match the given levels ofvisibility
.- Parameters:
visibilities
- Desired visibility levels. Cannot benull
.- Returns:
- Either the
List
ofOption
-s that match the given visibility levels or an emptyList
.
-
normalizeUserDirectory
-
readStartup
-
writeStartup
-