Class ValueModification
java.lang.Object
de.rpgframework.genericrpg.modification.Modification
de.rpgframework.genericrpg.modification.DataItemModification
de.rpgframework.genericrpg.modification.ValueModification
- Direct Known Subclasses:
CheckModification
@Root(name="valmod")
public class ValueModification
extends DataItemModification
implements Cloneable
-
Nested Class Summary
Nested classes/interfaces inherited from class de.rpgframework.genericrpg.modification.Modification
Modification.Origin -
Field Summary
Fields inherited from class de.rpgframework.genericrpg.modification.DataItemModification
choice, choiceOptions, date, decisions, expCost, id, ref, remove, restrictedToMode, variantFields inherited from class de.rpgframework.genericrpg.modification.Modification
apply, conditions, origin, source, type, when -
Constructor Summary
ConstructorsConstructorDescriptionValueModification(ModifiedObjectType type, String ref, int val) ValueModification(ModifiedObjectType type, String ref, int val, ApplyTo to, ValueType set) ValueModification(ModifiedObjectType type, String ref, int val, ApplyWhen when, ValueType set) ValueModification(ModifiedObjectType type, String ref, int val, Object src) ValueModification(ModifiedObjectType type, String ref, int val, Object src, ValueType set) ValueModification(ModifiedObjectType type, String ref, String val) ValueModification(ModifiedObjectType type, String ref, String val, ApplyTo to, ValueType set) ValueModification(ModifiedObjectType type, String ref, String val, ApplyWhen when, ValueType set) ValueModification(ModifiedObjectType type, String ref, String val, Object src) -
Method Summary
Modifier and TypeMethodDescriptionclone()String[]int[]Returns the declaration like it appears in the XML definition.getSet()Get the value setintgetValue()doubleString[]booleanbooleanbooleanisDouble()booleanbooleanbooleanisModMin()voidsetAbsolute(boolean absolute) voidsetFormula(Formula value) voidsetInstantiated(boolean instantiated) voidsetLookupTable(String[] table) voidsetRawValue(String val) voidvoidsetValue(int value) voidtoString()Methods inherited from class de.rpgframework.genericrpg.modification.DataItemModification
equals, getAsKeys, getChoiceOptions, getConnectedChoice, getDate, getDecision, getDecisions, getExpCost, getId, getKey, getResolvedKey, getVariant, isRemove, setDate, setDecisions, setExpCost, setId, setKey, setRemove, validateMethods inherited from class de.rpgframework.genericrpg.modification.Modification
getApplyTo, getConditionString, getOrigin, getReferenceType, getSource, getWhen, isConditional, setApplyTo, setConditionString, setOrigin, setSource, setWhen
-
Constructor Details
-
ValueModification
public ValueModification() -
ValueModification
-
ValueModification
-
ValueModification
-
ValueModification
-
ValueModification
-
ValueModification
public ValueModification(ModifiedObjectType type, String ref, int val, ApplyWhen when, ValueType set) -
ValueModification
public ValueModification(ModifiedObjectType type, String ref, String val, ApplyWhen when, ValueType set) -
ValueModification
-
ValueModification
public ValueModification(ModifiedObjectType type, String ref, String val, ApplyTo to, ValueType set)
-
-
Method Details
-
clone
- Overrides:
clonein classDataItemModification
-
hasFormula
public boolean hasFormula() -
isModMin
public boolean isModMin() -
isDouble
public boolean isDouble() -
toString
- Overrides:
toStringin classDataItemModification- See Also:
-
getValue
public int getValue()- Returns:
- The amount by which the value must be changed
-
getValueAsDouble
public double getValueAsDouble() -
getValueAsKeys
-
getModMinValues
public int[] getModMinValues() -
getFormula
-
setFormula
-
getRawValue
Returns the declaration like it appears in the XML definition. Use this method, if the value contains variables/formulas -
setRawValue
-
setValue
- Parameters:
value- The amount by which the value must be changed
-
setValue
public void setValue(int value) -
getSet
-
setSet
-
isIgnoreLimit
public boolean isIgnoreLimit()- Returns:
- the ignoreLimit
-
getLookupTable
- Returns:
- the lookupTable
-
setLookupTable
-
isInstantiated
public boolean isInstantiated()- Returns:
- the instantiated
-
setInstantiated
public void setInstantiated(boolean instantiated) - Parameters:
instantiated- the instantiated to set
-
isAbsolute
public boolean isAbsolute()- Returns:
- the absolute
-
setAbsolute
public void setAbsolute(boolean absolute) - Parameters:
absolute- the absolute to set
-