public interface AttributeCalculator
Modifier and Type | Method and Description |
---|---|
double |
calculateValue(double base,
Collection<AttributeModifier> modifiers)
Calculates the value of an attribute given a base value and a set of
Operation s and modification values. |
double calculateValue(double base, Collection<AttributeModifier> modifiers)
Calculates the value of an attribute given a base value and a set of
Operation
s and modification values. The order of operation
evaluation will be decided according to a list sorted by each operations
Comparable.compareTo(T)
method. Their
Operation.changeValueImmediately()
will determine whether after
being evaluated, an operation's incrementation will be added to the value
immediately, or be summed with all other incrementations from the same
type of operation, then added.
base
- The base value of the attributemodifiers
- A collection of AttributeModifier
s to be applied
to the base value