Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 1 | package net.onrc.onos.api.batchoperation; |
| 2 | |
| 3 | /** |
| 4 | * An add-operation entry of a batch operation. |
| 5 | */ |
| 6 | public class AddOperation implements BatchOperationEntry { |
Toshio Koide | 025a915 | 2014-07-21 11:00:34 -0700 | [diff] [blame^] | 7 | private final IBatchOperationTarget target; |
Toshio Koide | a03915e | 2014-07-01 18:39:52 -0700 | [diff] [blame] | 8 | |
| 9 | /** |
| 10 | * Creates a add-operation with specified target. |
| 11 | * |
| 12 | * @param target The target object to be assigned to this add-operation. |
| 13 | */ |
| 14 | public AddOperation(IBatchOperationTarget target) { |
| 15 | this.target = target; |
| 16 | } |
| 17 | |
| 18 | @Override |
| 19 | public BatchOperator getOperator() { |
| 20 | return BatchOperator.ADD; |
| 21 | } |
| 22 | |
| 23 | /** |
| 24 | * Gets the target object which assigned to this add-operation. |
| 25 | * |
| 26 | * @return The target object which assigned to this add-operation. |
| 27 | */ |
| 28 | public IBatchOperationTarget getTarget() { |
| 29 | return target; |
| 30 | } |
| 31 | } |