Class AttributeModifier<T extends java.lang.Number>
java.lang.Object
de.gurkenlabs.litiengine.attributes.AttributeModifier<T>
- Type Parameters:
T- the generic type
- All Implemented Interfaces:
java.lang.Comparable<AttributeModifier<T>>
public class AttributeModifier<T extends java.lang.Number>
extends java.lang.Object
implements java.lang.Comparable<AttributeModifier<T>>An attribute modifier allows to modify attributes by the
specified Modification and modify value.
Constructor Summary
Constructors Constructor Description AttributeModifier(Modification mod, double modifyValue)Initializes a new instance of theAttributeModifierclass.Method Summary
Modifier and Type Method Description intcompareTo(AttributeModifier<T> otherModifier)booleanequals(java.lang.Object obj)ModificationgetModification()Gets the modification type applied by this modifier.doublegetModifyValue()Gets the value that is used to modify an attribute.inthashCode()booleanisActive()Tmodify(T modvalue)voidsetActive(boolean active)voidsetModifyValue(double value)
Constructor Details
AttributeModifier
Initializes a new instance of theAttributeModifierclass.- Parameters:
mod- The modification type.modifyValue- The modification value to be applied by this instance.
Method Details
compareTo
- Specified by:
compareToin interfacejava.lang.Comparable<T extends java.lang.Number>
equals
public boolean equals(java.lang.Object obj)- Overrides:
equalsin classjava.lang.Object
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
getModification
Gets the modification type applied by this modifier.- Returns:
- The modification type applied by this modifier.
getModifyValue
public double getModifyValue()Gets the value that is used to modify an attribute.- Returns:
- The value that is used to modify an attribute.
isActive
public boolean isActive()modify
setModifyValue
public void setModifyValue(double value)setActive
public void setActive(boolean active)
