when<S> method
S
when<S>({
- required S insert(
- int p1,
- T p2
- required S remove(
- int p1,
- T p2
- required S change(
- int p1,
- T p2,
- T p3
- required S move(),
override
call one of the given callback functions depending on the type of this object.
@param insert callback function to be called if this object is of type DataInsert
@param remove callback function to be called if this object is of type DateRemove
@param change callback function to be called if this object is of type DateChange
@param move callback function to be called if this object is of type DateMove
Implementation
@override
S when<S>(
{required S Function(int p1, T p2) insert,
required S Function(int p1, T p2) remove,
required S Function(int p1, T p2, T p3) change,
required S Function(int p1, int p2, T data) move}) {
return change(position, oldData, newData);
}