megamek.common.options
Class OptionGroup

java.lang.Object
  extended by megamek.common.options.OptionGroup
All Implemented Interfaces:
java.io.Serializable, IBasicOptionGroup

public class OptionGroup
extends java.lang.Object
implements IBasicOptionGroup, java.io.Serializable

See Also:
Serialized Form

Constructor Summary
OptionGroup(java.lang.String name)
          Creates new OptionGroup with empty key
OptionGroup(java.lang.String name, java.lang.String key)
          Creates new OptionGroup
 
Method Summary
 void addOptionName(java.lang.String optionName)
          Adds new option name to this group.
 java.lang.String getKey()
          Returns the the String key that can be used by clients to distinguish option groups by their own criterion
 java.lang.String getName()
          Returns the 'internal'(NON-NLS) name of the group, which is the only ID that is unique in the parent container
 java.util.Enumeration<java.lang.String> getOptionNames()
           
 void setKey(java.lang.String key)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OptionGroup

public OptionGroup(java.lang.String name,
                   java.lang.String key)
Creates new OptionGroup

Parameters:
name - group name
key - optional key

OptionGroup

public OptionGroup(java.lang.String name)
Creates new OptionGroup with empty key

Parameters:
name - option name
Method Detail

getName

public java.lang.String getName()
Description copied from interface: IBasicOptionGroup
Returns the 'internal'(NON-NLS) name of the group, which is the only ID that is unique in the parent container

Specified by:
getName in interface IBasicOptionGroup
Returns:
group name
See Also:
IOptionGroup.getDisplayableName()

setKey

public void setKey(java.lang.String key)

getKey

public java.lang.String getKey()
Description copied from interface: IBasicOptionGroup
Returns the the String key that can be used by clients to distinguish option groups by their own criterion

Specified by:
getKey in interface IBasicOptionGroup
Returns:
group key which can be an empty String

getOptionNames

public java.util.Enumeration<java.lang.String> getOptionNames()
Specified by:
getOptionNames in interface IBasicOptionGroup
Returns:
the Enumeration of the names of the options that in this group

addOptionName

public void addOptionName(java.lang.String optionName)
Adds new option name to this group. The option names are unique, so if there is already an option optionName this function does nothing.

Parameters:
optionName - new option name