Package net.sf.freecol.common.option
Interface Option<T>
-
- All Superinterfaces:
java.lang.Cloneable
,ObjectWithId
- All Known Implementing Classes:
AboutAction
,AbstractOption
,AbstractUnitOption
,ActionManager
,AssignTradeRouteAction
,AudioMixerOption
,BooleanOption
,BuildColonyAction
,CenterAction
,ChangeAction
,ChangeWindowedModeAction
,ChatAction
,ClearOrdersAction
,ClientOptions
,ColopediaAction
,ContinueAction
,DebugAction
,DeclareIndependenceAction
,DetermineHighSeasAction
,DisbandUnitAction
,DisplayBordersAction
,DisplayFogOfWarAction
,DisplayGridAction
,DisplayTileTextAction
,EndTurnAction
,EuropeAction
,ExecuteGotoOrdersAction
,FileOption
,FindSettlementAction
,FortifyAction
,FreeColAction
,GotoAction
,GotoTileAction
,ImprovementAction
,IntegerOption
,LanguageOption
,ListOption
,LoadAction
,MapboardAction
,MapControlsAction
,MapEditorAction
,MiniMapToggleFogOfWarAction
,MiniMapToggleViewAction
,MiniMapZoomInAction
,MiniMapZoomOutAction
,ModListOption
,ModOption
,MoveAction
,NewAction
,NewEmptyMapAction
,OpenAction
,OptionGroup
,PercentageOption
,PreferencesAction
,QuitAction
,RangeOption
,ReconnectAction
,RenameAction
,ReportCargoAction
,ReportColonyAction
,ReportContinentalCongressAction
,ReportEducationAction
,ReportExplorationAction
,ReportForeignAction
,ReportHighScoresAction
,ReportHistoryAction
,ReportIndianAction
,ReportLabourAction
,ReportMilitaryAction
,ReportNavalAction
,ReportProductionAction
,ReportReligionAction
,ReportRequirementsAction
,ReportTradeAction
,ReportTurnAction
,RetireAction
,SaveAction
,SaveAndQuitAction
,ScaleMapAction
,SelectableAction
,SelectOption
,SentryAction
,ShowDifficultyAction
,ShowGameOptionsAction
,ShowMainAction
,ShowMapGeneratorOptionsAction
,SkipUnitAction
,StartMapAction
,StringOption
,TextOption
,TilePopupAction
,ToggleViewModeAction
,TradeRouteAction
,UnitAction
,UnitListOption
,UnitTypeOption
,UnloadAction
,WaitAction
,ZoomInAction
,ZoomOutAction
public interface Option<T> extends java.lang.Cloneable, ObjectWithId
An option describes something which can be customized by the user.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Option<T>
cloneOption()
Clone this option.java.lang.String
getEnabledBy()
Gets the key of anBooleanOption
that must be true for this option to be enabled.java.lang.String
getGroup()
Gets the option group identifier for this option.T
getValue()
Gets the value of this option.void
readFromXML(FreeColXMLReader xr)
Initializes this object from an XML-representation of this object.void
setGroup(java.lang.String group)
Set the option group for this option.void
setValue(T value)
Sets the value of this option.java.lang.String
toString()
void
toXML(FreeColXMLWriter xw)
Makes an XML-representation of this object.-
Methods inherited from interface net.sf.freecol.common.ObjectWithId
getId
-
-
-
-
Method Detail
-
cloneOption
Option<T> cloneOption() throws java.lang.CloneNotSupportedException
Clone this option.- Returns:
- A clone of this option.
- Throws:
java.lang.CloneNotSupportedException
- if we can not clone.
-
getGroup
java.lang.String getGroup()
Gets the option group identifier for this option.- Returns:
- The option group identifier.
-
setGroup
void setGroup(java.lang.String group)
Set the option group for this option.- Parameters:
group
- The identifier for the option group.
-
getValue
T getValue()
Gets the value of this option.- Returns:
- The value of this
Option
.
-
setValue
void setValue(T value)
Sets the value of this option.- Parameters:
value
- The new value of thisOption
.
-
getEnabledBy
java.lang.String getEnabledBy()
Gets the key of anBooleanOption
that must be true for this option to be enabled.- Returns:
- The key of the
BooleanOption
that needs to be enabled.
-
readFromXML
void readFromXML(FreeColXMLReader xr) throws javax.xml.stream.XMLStreamException
Initializes this object from an XML-representation of this object.- Parameters:
xr
- The input stream with the XML.- Throws:
javax.xml.stream.XMLStreamException
- if there are any problems reading the stream.
-
toXML
void toXML(FreeColXMLWriter xw) throws javax.xml.stream.XMLStreamException
Makes an XML-representation of this object.- Parameters:
xw
- TheFreeColXMLWriter
to write to.- Throws:
javax.xml.stream.XMLStreamException
- if there are any problems writing the stream.
-
toString
java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-