public class AddTreeOperation extends UpdateOperation
Operation.OperationType
Constructor and Description |
---|
AddTreeOperation(Address address,
Tree tree)
Constructor of the operations ReplaceTreeOperation
|
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 java.util.Collection<OperationSequence> abstractionToOperationSequences(Tree t) throws badOperationException, badAddressException, noNodeException, headerNodeException, addNodeException, removeNodeException, abstractOperationException
UpdateOperation
abstractionToOperationSequences
in class UpdateOperation
addNodeException
removeNodeException
abstractOperationException
badOperationException
badAddressException
noNodeException
headerNodeException
public void make(Tree tree) throws addNodeException, badAddressException
Operation
make
in class Operation
tree
- Tree where the Operation should be doneaddNodeException
- Throws this Exception if the Operation implicates the
creation of a Node that can't be donebadAddressException
- Throws this Exception if there is an error while creating new
Addressespublic int getCost(Tree tree)
Operation
public 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