public enum OptionMaster extends Enum<OptionMaster>
Modifier and Type | Class and Description |
---|---|
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. |
Enum Constant and Description |
---|
INSTANCE
The lone OptionMaster instance.
|
Modifier and Type | Field and Description |
---|---|
Object[][] |
blahblah |
private Map<String,Option> |
optionMap
Maps an option ID to the corresponding object.
|
Modifier and Type | Method and Description |
---|---|
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
StartupManager.Platform to its corresponding
OptionMaster.OptionPlatform type. |
Collection<Option> |
getAllOptions() |
Option |
getOption(String id)
Returns the
Option mapped to id . |
private void |
normalizeUserDirectory() |
Collection<Option> |
optionsByPlatform(Set<OptionMaster.OptionPlatform> platforms) |
Collection<Option> |
optionsByType(Set<OptionMaster.Type> types) |
Collection<Option> |
optionsByVisibility(Set<OptionMaster.Visibility> visibilities) |
void |
readStartup() |
static OptionMaster |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static OptionMaster[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
void |
writeStartup() |
public static final OptionMaster INSTANCE
public static OptionMaster[] values()
for (OptionMaster c : OptionMaster.values()) System.out.println(c);
public static OptionMaster 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 nullprivate 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()
StartupManager.Platform
to its corresponding
OptionMaster.OptionPlatform
type.OptionPlatform
type.AssertionError
- if StartupManager.getPlatform()
returned something that this method cannot convert.public 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.public Collection<Option> getAllOptions()
public Collection<Option> optionsByPlatform(Set<OptionMaster.OptionPlatform> platforms)
public Collection<Option> optionsByType(Set<OptionMaster.Type> types)
public Collection<Option> optionsByVisibility(Set<OptionMaster.Visibility> visibilities)
private void normalizeUserDirectory()
public void readStartup()
public void writeStartup()