Package megamek.common.options
Interface IGameOptions
- All Known Implementing Classes:
AbstractOptions,BasicGameOptions,GameOptions,PartialRepairs,PilotOptions,Quirks,SBFRuleOptions,SimulationOptions,WeaponQuirks
public interface IGameOptions
-
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanOption(String name) Returns the value of the desired option as thebooleanintcount()Returns a count of all options in this object.intReturns a count of all options in this object with the given group key.floatfloatOption(String name) Returns the value of the desired option as thefloatReturns theEnumerationof the option groups in the options container.Returns the option by name ornullif there is no such optiongetOptionInfo(String name) Returns the UI specific data to allow the user to set the optiongetOptionList(String separator) Returns a string of all the quirk "codes" for this entity, using sep as the separatorgetOptionListString(String separator, String groupKey) Returns a string of all the quirk "codes" for this entity, using sep as the separator, filtering on a specific group key.Returns theEnumerationof the options in this options container.Returns the options info object for this options object.Returns a collection of all the options in this options container, regardless of whether they're active/selected or not.intReturns the value of the desired option as theintstringOption(String name) Returns the value of the desired option as theString
-
Method Details
-
count
int count()Returns a count of all options in this object.- Returns:
- Option count.
-
count
Returns a count of all options in this object with the given group key.- Parameters:
groupKey- the group key to filter on. Null signifies to return all options indiscriminately.- Returns:
- Option count.
-
getOptionList
Returns a string of all the quirk "codes" for this entity, using sep as the separator- Parameters:
separator- The separator to insert between codes, in addition to a space
-
getOptionListString
Returns a string of all the quirk "codes" for this entity, using sep as the separator, filtering on a specific group key.- Parameters:
separator- The separator to insert between codes, in addition to a spacegroupKey- The group key to use to filter options. Null signifies to return all options indiscriminately.
-
getGroups
Enumeration<IOptionGroup> getGroups()Returns theEnumerationof the option groups in the options container.- Returns:
Enumerationof theIOptionGroup
-
getOptions
Enumeration<IOption> getOptions()Returns theEnumerationof the options in this options container. The order of options is not specified.- Returns:
Enumerationof theIOption
-
getOptionsList
Collection<IOption> getOptionsList()Returns a collection of all the options in this options container, regardless of whether they're active/selected or not. Note that this Collection is unmodifiable, but the contained IOptions are not copied, so changing their state will affect this options object.- Returns:
- A collection containing all IOptions of this options object
-
getOptionInfo
Returns the UI specific data to allow the user to set the option- Parameters:
name- option name- Returns:
- UI specific data
- See Also:
-
getOption
Returns the option by name ornullif there is no such option- Parameters:
name- option name- Returns:
- the option or
nullif there is no such option
-
booleanOption
Returns the value of the desired option as theboolean- Parameters:
name- option name- Returns:
- the value of the desired option as the
boolean
-
intOption
Returns the value of the desired option as theint- Parameters:
name- option name- Returns:
- the value of the desired option as the
int
-
floatOption
Returns the value of the desired option as thefloat- Parameters:
name- option name- Returns:
- the value of the desired option as the
float
-
stringOption
Returns the value of the desired option as theString- Parameters:
name- option name- Returns:
- the value of the desired option as the
String
-
getOptionsInfo
IOptionsInfo getOptionsInfo()Returns the options info object for this options object.- Returns:
- the options info object for this options object.
-