public class RemoveTreeOperation extends UpdateOperation
Operation.OperationType
Constructor and Description |
---|
RemoveTreeOperation(Address address)
Constructor of the operation RemoveTreeOperation
|
Modifier and Type | Method and Description |
---|---|
java.util.Collection<OperationSequence> |
abstractionToOperationSequences(Tree t)
Generates a list of OperationSequence that can't contain any Operation
that is Abstract
|
Operation |
clone()
Creates a copy of the Operation
|
boolean |
equals(java.lang.Object o)
Tests if the object given is from the same type and has the same
hashCode, this means they have the same values for attributes
|
int |
getCost(Tree tree)
Calculates the cost of the Operation on the given Tree
|
int |
hashCode()
Returns an unique hashCode depending on the values of the attributes
|
boolean |
isAbstractStrict()
Tests if the Operation is an Abstract Strict Operation, meaning a
compilation of multiple UpdateOperation that have the same cost but not
the same result
|
void |
make(Tree tree)
Makes the Operation on the given Tree
|
java.lang.String |
toString()
Converts the operation to a string like OperationName[attributes]
|
org.jdom.Element |
toXmlElement() |
org.jdom.Element |
toXmlElement(VocabTranslator vt) |
isAbstract
addAddressPrefix, getAddress, getOperationString, getOperationType, setAddress, toCompleteString
public RemoveTreeOperation(Address address)
address
- Address of the sub Tree that has to be removedpublic java.util.Collection<OperationSequence> abstractionToOperationSequences(Tree t) throws badOperationException, badAddressException, noNodeException, addNodeException, removeNodeException, headerNodeException, abstractOperationException
UpdateOperation
abstractionToOperationSequences
in class UpdateOperation
addNodeException
removeNodeException
abstractOperationException
badOperationException
badAddressException
noNodeException
headerNodeException
public int getCost(Tree tree) throws noNodeException
Operation
getCost
in class Operation
tree
- Tree where the Operation should be madenoNodeException
- Throws this exception if the Operation contains an Address
that doesn't exist in the given Treepublic void make(Tree tree) throws noNodeException, badAddressException
Operation
make
in class Operation
tree
- Tree where the Operation should be donenoNodeException
- Throws this Exception if the Operation implicates an access
to a Node that doesn't existbadAddressException
- Throws this Exception if there is an error while creating new
Addressespublic java.lang.String toString()
Operation
public Operation clone()
Operation
public boolean isAbstractStrict()
Operation
isAbstractStrict
in class Operation
public boolean equals(java.lang.Object o)
Operation
public int hashCode()
Operation
public org.jdom.Element toXmlElement()
toXmlElement
in class Operation
public org.jdom.Element toXmlElement(VocabTranslator vt)
toXmlElement
in class Operation