edu.wisc.ssec.mcidasv.startupmanager.options
Enum OptionMaster

java.lang.Object
  extended by java.lang.Enum<OptionMaster>
      extended by edu.wisc.ssec.mcidasv.startupmanager.options.OptionMaster
All Implemented Interfaces:
Serializable, Comparable<OptionMaster>

public enum OptionMaster
extends Enum<OptionMaster>


Nested Class Summary
static class OptionMaster.OptionPlatform
          Options can be either platform-specific or applicable to all platforms.
static class OptionMaster.Type
          The different types of Options.
static class OptionMaster.Visibility
          Different ways that an Option might be displayed.
 
Enum Constant Summary
INSTANCE
          The lone OptionMaster instance.
 
Field Summary
 Object[][] blahblah
           
private  Map<String,Option> optionMap
          Maps an option ID to the corresponding object.
 
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()
           
 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()
           
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

INSTANCE

public static final OptionMaster INSTANCE
The lone OptionMaster instance.

Field Detail

blahblah

public final Object[][] blahblah

optionMap

private final Map<String,Option> optionMap
Maps an option ID to the corresponding object.

Method Detail

values

public static OptionMaster[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (OptionMaster c : OptionMaster.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static OptionMaster valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

buildOptions

private Map<String,Option> buildOptions(Object[][] options)
Creates the specified options and returns a mapping of the option ID to the actual Option object.

Parameters:
options - An array specifying the Options to be built.
Returns:
Mapping of ID to Option.
Throws:
AssertionError - if the option array contained an entry that this method cannot build.

convertToOptionPlatform

protected OptionMaster.OptionPlatform convertToOptionPlatform()
Converts a OptionMaster.OptionPlatform to its corresponding OptionMaster.OptionPlatform type.

Returns:
The current platform as a OptionPlatform type.
Throws:
AssertionError - if StartupManager.getPlatform() returned something that this method cannot convert.

getOption

public Option getOption(String id)
Returns the Option mapped to id.

Parameters:
id - The ID whose associated Option is to be returned.
Returns:
Either the Option associated with id, or null if there was no association.

getAllOptions

public Collection<Option> getAllOptions()

optionsByPlatform

public Collection<Option> optionsByPlatform(Set<OptionMaster.OptionPlatform> platforms)

optionsByType

public Collection<Option> optionsByType(Set<OptionMaster.Type> types)

optionsByVisibility

public Collection<Option> optionsByVisibility(Set<OptionMaster.Visibility> visibilities)

normalizeUserDirectory

private void normalizeUserDirectory()

readStartup

public void readStartup()

writeStartup

public void writeStartup()