1 | package com.hammurapi.eventbus; |
2 | |
3 | import java.util.Arrays; |
4 | |
5 | import com.hammurapi.eventbus.AbstractEventBus.Handle; |
6 | |
7 | |
8 | /** |
9 | * @author Pavel Vlasov |
10 | * |
11 | * @param <E> |
12 | * @param <P> |
13 | * @param <C> |
14 | * @param <H> |
15 | */ |
16 | public class RemoveCommand<E, P extends Comparable<P>, C, K, H extends EventBus.Handle<E,P,C>, S extends EventStore<E,P,C,H,S>> extends InferenceCommand<E,P,C,K,H,S> { |
17 | |
18 | private Handle<E,P,C,K> handle; |
19 | private boolean forUpdate; |
20 | |
21 | public RemoveCommand( |
22 | Handle<E,P,C,K> handle, |
23 | K handlerId, |
24 | EventHandler<E, P, C, H, S> handler, |
25 | InferenceContext<E,P,C,K,H,S> inferenceContext, |
26 | boolean forUpdate, |
27 | Handle<E,P,C,K>[] inputs) { |
28 | super(handlerId,handler,inputs,inferenceContext); |
29 | this.handle = handle; |
30 | this.forUpdate = forUpdate; |
31 | } |
32 | |
33 | public Handle<E, P, C, K> getHandle() { |
34 | return handle; |
35 | } |
36 | |
37 | public boolean isForUpdate() { |
38 | return forUpdate; |
39 | } |
40 | |
41 | @Override |
42 | public String toString() { |
43 | return "RemoveCommand [handle=" + handle |
44 | + ", handler=" + getHandler() + ", forUpdate=" + forUpdate + ", inputs=" |
45 | + Arrays.toString(getInputs()) + "]"; |
46 | } |
47 | |
48 | |
49 | } |