Package org.onosproject.net.flow
Class BatchOperation<T extends BatchOperationEntry<?,?>>
- java.lang.Object
 - 
- org.onosproject.net.flow.BatchOperation<T>
 
 
- 
- Type Parameters:
 T- the enum of operators
This enum must be defined in each sub-classes.
- Direct Known Subclasses:
 FlowRuleBatchOperation
public abstract class BatchOperation<T extends BatchOperationEntry<?,?>> extends Object
A list of BatchOperationEntry. 
- 
- 
Constructor Summary
Constructors Constructor Description BatchOperation()Creates newBatchOperationobject.BatchOperation(Collection<T> batchOperations)CreatesBatchOperationobject from a list of batch operation entries. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddAll(BatchOperation<T> another)Add all operations from another batch to this batch.BatchOperation<T>addOperation(T entry)Adds an operation.voidclear()Removes all operations maintained in this object.booleanequals(Object o)List<T>getOperations()Returns the operations in this object.inthashCode()intsize()Returns the number of operations in this object.StringtoString() 
 - 
 
- 
- 
Constructor Detail
- 
BatchOperation
public BatchOperation()
Creates newBatchOperationobject. 
- 
BatchOperation
public BatchOperation(Collection<T> batchOperations)
CreatesBatchOperationobject from a list of batch operation entries.- Parameters:
 batchOperations- the list of batch operation entries.
 
 - 
 
- 
Method Detail
- 
clear
public void clear()
Removes all operations maintained in this object. 
- 
size
public int size()
Returns the number of operations in this object.- Returns:
 - the number of operations in this object
 
 
- 
getOperations
public List<T> getOperations()
Returns the operations in this object.- Returns:
 - the operations in this object
 
 
- 
addOperation
public BatchOperation<T> addOperation(T entry)
Adds an operation. FIXME: Brian promises that the Intent Framework will not modify the batch operation after it has submitted it. Ali would prefer immutablity, but trusts brian for better or for worse.- Parameters:
 entry- the operation to be added- Returns:
 - this object if succeeded, null otherwise
 
 
- 
addAll
public boolean addAll(BatchOperation<T> another)
Add all operations from another batch to this batch.- Parameters:
 another- another batch- Returns:
 - true if success
 
 
 - 
 
 -