Class BatchOperation<T extends BatchOperationEntry<?,​?>>

  • 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 java.lang.Object
    A list of BatchOperationEntry.
    • Constructor Detail

      • BatchOperation

        public BatchOperation()
        Creates new BatchOperation object.
      • BatchOperation

        public BatchOperation​(java.util.Collection<T> batchOperations)
        Creates BatchOperation object 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 java.util.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
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object