Package zendesk.support.suas
Class Reducer<E>
- java.lang.Object
-
- zendesk.support.suas.Reducer<E>
-
- Type Parameters:
E- type of the state
public abstract class Reducer<E> extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor and Description Reducer()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method and Description abstract EgetInitialState()Returns an empty or default instance ofE.java.lang.StringgetStateKey()Gets a state key that's unique among allReducer.abstract Ereduce(E state, Action<?> action)Reduce state.
-
-
-
Method Detail
-
reduce
public abstract E reduce(E state, Action<?> action)
Reduce state. Apply the provided action on the oldState.- Returns:
- the new state, or
nullif nothing has changed
-
getInitialState
public abstract E getInitialState()
Returns an empty or default instance ofE.
-
getStateKey
public java.lang.String getStateKey()
Gets a state key that's unique among allReducer.
-
-