Interface ITickUpdateHandler
-
- All Known Implementing Classes:
TickUpdateHandlerFixture
public interface ITickUpdateHandler
Interface for handler that is responsible for handling tick updates. Will return information about which type of objects it can handle and will do the increment/decrement calculation. Also specifies the default implementation that can handleNumber
values.
-
-
Field Summary
Fields Modifier and Type Field Description static ITickUpdateHandler
DEFAULT_TICK_UPDATE_HANDLER
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Object
getDecrementedValue(Object currentValue)
Perform an decrement of the current value by a default value.Object
getDecrementedValue(Object currentValue, double decrementSize)
Perform an decrement of the current value by the given decrement value.Object
getIncrementedValue(Object currentValue)
Perform an increment of the current value by a default value.Object
getIncrementedValue(Object currentValue, double incrementSize)
Perform an increment of the current value by the given increment value.boolean
isApplicableFor(Object value)
Checks if the given object can be handled by this handler.
-
-
-
Field Detail
-
DEFAULT_TICK_UPDATE_HANDLER
static final ITickUpdateHandler DEFAULT_TICK_UPDATE_HANDLER
-
-
Method Detail
-
isApplicableFor
boolean isApplicableFor(Object value)
Checks if the given object can be handled by this handler. Usually it will simply perform a instanceof check.- Parameters:
value
- The value to check.- Returns:
true
if this handler is able to perform tick updates on the given value,false
if not.
-
getIncrementedValue
Object getIncrementedValue(Object currentValue)
Perform an increment of the current value by a default value.- Parameters:
currentValue
- The value to perform the increment on.- Returns:
- The new value after increment it by a default value.
-
getIncrementedValue
Object getIncrementedValue(Object currentValue, double incrementSize)
Perform an increment of the current value by the given increment value.- Parameters:
currentValue
- The value to perform the increment on.incrementSize
- The value the currentValue should be incremented by.- Returns:
- The new value after increment it by the specified value.
-
getDecrementedValue
Object getDecrementedValue(Object currentValue)
Perform an decrement of the current value by a default value.- Parameters:
currentValue
- The value to perform the decrement on.- Returns:
- The new value after decrement it by a default value.
-
getDecrementedValue
Object getDecrementedValue(Object currentValue, double decrementSize)
Perform an decrement of the current value by the given decrement value.- Parameters:
currentValue
- The value to perform the decrement on.decrementSize
- The value the currentValue should be decremented by.- Returns:
- The new value after decrement it by the specified value.
-
-