when<S> abstract method
S
when<S>({})
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 NodeInsert @param remove callback function to be called if this object is of type NodeRemove @param add callback function to be called if this object is of type NodeAdd
Implementation
S when<S>({
required S Function(INode data, int position) insert,
required S Function(INode data, int? position) remove,
required S Function(INode data) add,
required S Function(INode update) update,
});