blob: 23b3e39bc7d853cf517d431d3d34fabba16aea1f [file] [log] [blame]
Toshio Koidea03915e2014-07-01 18:39:52 -07001package net.onrc.onos.api.batchoperation;
2
3/**
Toshio Koide4ea84192014-07-31 12:10:12 -07004 * A super class for batch operation entry classes.
Toshio Koidea03915e2014-07-01 18:39:52 -07005 * <p>
Toshio Koide4ea84192014-07-31 12:10:12 -07006 * This is the interface to classes which are maintained by BatchOperation as
7 * its entries.
Toshio Koidea03915e2014-07-01 18:39:52 -07008 */
Toshio Koide4ea84192014-07-31 12:10:12 -07009public class BatchOperationEntry<T extends Enum<?>, U extends IBatchOperationTarget> {
10 private final T operator;
11 private final U target;
12
Toshio Koidea03915e2014-07-01 18:39:52 -070013 /**
Toshio Koide4ea84192014-07-31 12:10:12 -070014 * Constructs new instance for the entry of the BatchOperation.
Toshio Koidea03915e2014-07-01 18:39:52 -070015 *
Toshio Koide4ea84192014-07-31 12:10:12 -070016 * @param operator the operator of this operation
17 * @param target the target object of this operation
Toshio Koidea03915e2014-07-01 18:39:52 -070018 */
Toshio Koide4ea84192014-07-31 12:10:12 -070019 public BatchOperationEntry(T operator, U target) {
20 this.operator = operator;
21 this.target = target;
22 }
23
24 /**
25 * Gets the target object of this operation.
26 *
27 * @return the target object of this operation
28 */
29 public U getTarget() {
30 return target;
31 }
32
33 /**
34 * Gets the operator of this operation.
35 *
36 * @return the operator of this operation
37 */
38 public T getOperator() {
39 return operator;
40 }
Toshio Koidea03915e2014-07-01 18:39:52 -070041}