Class AbstractModifier
java.lang.Object
me.datafox.dfxengine.dependencies.AbstractDependency
me.datafox.dfxengine.dependencies.DependencyDependent
me.datafox.dfxengine.values.modifier.AbstractModifier
- All Implemented Interfaces:
Comparable<Modifier>,Function<Numeral,,Numeral> Dependency,Dependent,Modifier
- Direct Known Subclasses:
OperationModifier
-
Field Summary
FieldsFields inherited from class me.datafox.dfxengine.dependencies.AbstractDependency
dependents, logger -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractModifier(org.slf4j.Logger logger, int priority, Value... parameters) -
Method Summary
Modifier and TypeMethodDescriptionprotected ValuegetParameter(int index) protected Value[]protected voidThis method should be treated as the equivalent ofDependent.invalidate()for classes extending DependencyDependent.Methods inherited from class me.datafox.dfxengine.dependencies.DependencyDependent
invalidateMethods inherited from class me.datafox.dfxengine.dependencies.AbstractDependency
addDependent, addDependents, containsDependent, containsDependentRecursive, containsDependents, containsDependentsRecursive, dependentStream, getDependents, invalidateDependents, recursiveDependentStream, removeDependent, removeDependentsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface me.datafox.dfxengine.dependencies.Dependency
addDependent, addDependents, containsDependent, containsDependentRecursive, containsDependents, containsDependentsRecursive, dependentStream, getDependents, invalidateDependents, recursiveDependentStream, removeDependent, removeDependentsMethods inherited from interface me.datafox.dfxengine.dependencies.Dependent
invalidateMethods inherited from interface me.datafox.dfxengine.values.api.Modifier
compareTo, getPriority
-
Field Details
-
priority
protected final int priorityPriority for this operation
-
-
Constructor Details
-
AbstractModifier
- Parameters:
logger-Loggerfor this modifierpriority- priority for this modifierparameters- parameterValuesfor this modifier
-
-
Method Details
-
onInvalidate
protected void onInvalidate()This method should be treated as the equivalent ofDependent.invalidate()for classes extending DependencyDependent. This exists to avoid the need for callingsuper.invalidate()orAbstractDependency.invalidateDependents()which may cause hidden or hard to find bugs when forgotten.- Specified by:
onInvalidatein classDependencyDependent
-
getParameter
- Parameters:
index- parameter index- Returns:
- parameter
Valuefor the specified index - Throws:
ArrayIndexOutOfBoundsException- if the index is out of bounds
-
getParameters
- Returns:
- array of parameter
Values
-