Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 1 | package net.onrc.onos.api.batchoperation; |
| 2 | |
| 3 | /** |
Toshio Koide | 4ea8419 | 2014-07-31 12:10:12 -0700 | [diff] [blame^] | 4 | * A super class for batch operation entry classes. |
Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 5 | * <p> |
Toshio Koide | 4ea8419 | 2014-07-31 12:10:12 -0700 | [diff] [blame^] | 6 | * This is the interface to classes which are maintained by BatchOperation as |
| 7 | * its entries. |
Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 8 | */ |
Toshio Koide | 4ea8419 | 2014-07-31 12:10:12 -0700 | [diff] [blame^] | 9 | public class BatchOperationEntry<T extends Enum<?>, U extends IBatchOperationTarget> { |
| 10 | private final T operator; |
| 11 | private final U target; |
| 12 | |
Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 13 | /** |
Toshio Koide | 4ea8419 | 2014-07-31 12:10:12 -0700 | [diff] [blame^] | 14 | * Constructs new instance for the entry of the BatchOperation. |
Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 15 | * |
Toshio Koide | 4ea8419 | 2014-07-31 12:10:12 -0700 | [diff] [blame^] | 16 | * @param operator the operator of this operation |
| 17 | * @param target the target object of this operation |
Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 18 | */ |
Toshio Koide | 4ea8419 | 2014-07-31 12:10:12 -0700 | [diff] [blame^] | 19 | 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 Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 41 | } |