Package net.sf.gridarta.plugin.parameter
Class BooleanParameter<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>>
- java.lang.Object
-
- net.sf.gridarta.plugin.parameter.AbstractPluginParameter<G,A,R,V>
-
- net.sf.gridarta.plugin.parameter.AbstractValuePluginParameter<G,A,R,java.lang.Boolean>
-
- net.sf.gridarta.plugin.parameter.BooleanParameter<G,A,R>
-
- All Implemented Interfaces:
PluginParameter<G,A,R,java.lang.Boolean>
public class BooleanParameter<G extends GameObject<G,A,R>,A extends MapArchObject<A>,R extends Archetype<G,A,R>> extends AbstractValuePluginParameter<G,A,R,java.lang.Boolean>
APluginParameterthat holds a boolean value.
-
-
Field Summary
Fields Modifier and Type Field Description static @NotNull java.lang.StringPARAMETER_TYPEThe string representation of this parameter type.
-
Constructor Summary
Constructors Constructor Description BooleanParameter()Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull java.lang.StringgetFalseText()Returns the string representation of the "false" value.@NotNull java.lang.StringgetParameterType()Returns the parameter type name.@NotNull java.lang.StringgetStringValue()Returns the string representation of the current value of the parameter.@NotNull java.lang.StringgetTrueText()Returns the string representation of the "true" value.voidsetFalseText(@NotNull java.lang.String falseText)Sets the string representation of the "false" value.booleansetStringValue(@NotNull java.lang.String stringValue)Sets the parameter value from string representation.voidsetTrueText(@NotNull java.lang.String trueText)Sets the string representation of the "true" value.<T> Tvisit(@NotNull PluginParameterVisitor<G,A,R,T> visitor)Calls thevisit()function for this parameter type.-
Methods inherited from class net.sf.gridarta.plugin.parameter.AbstractValuePluginParameter
getValue, getValueOrNull, setValue
-
Methods inherited from class net.sf.gridarta.plugin.parameter.AbstractPluginParameter
addPluginParameterListener, changed, getDescription, getName, removePluginParameterListener, setDescription, setName
-
-
-
-
Method Detail
-
visit
@NotNull public <T> T visit(@NotNull @NotNull PluginParameterVisitor<G,A,R,T> visitor)Description copied from interface:PluginParameterCalls thevisit()function for this parameter type.- Type Parameters:
T- the visitor-specific type of the return value- Parameters:
visitor- the visitor to call- Returns:
- a visitor-specific return value
-
setStringValue
public boolean setStringValue(@NotNull @NotNull java.lang.String stringValue)Description copied from interface:PluginParameterSets the parameter value from string representation.- Parameters:
stringValue- the string representation of the value to set- Returns:
trueif the value was accepted orfalseif the value was not changed because the new value is invalid
-
getParameterType
@NotNull public @NotNull java.lang.String getParameterType()
Description copied from interface:PluginParameterReturns the parameter type name.- Returns:
- the parameter type name
-
getStringValue
@NotNull public @NotNull java.lang.String getStringValue()
Description copied from interface:PluginParameterReturns the string representation of the current value of the parameter.- Returns:
- the string representation of the value
-
getFalseText
@NotNull public @NotNull java.lang.String getFalseText()
Returns the string representation of the "false" value.- Returns:
- the string representation
-
getTrueText
@NotNull public @NotNull java.lang.String getTrueText()
Returns the string representation of the "true" value.- Returns:
- the string representation
-
setFalseText
public void setFalseText(@NotNull @NotNull java.lang.String falseText)Sets the string representation of the "false" value.- Parameters:
falseText- the string representation
-
setTrueText
public void setTrueText(@NotNull @NotNull java.lang.String trueText)Sets the string representation of the "true" value.- Parameters:
trueText- the string representation
-
-