public class CorrectTreeOperation extends AbstractUpdateOperation
Operation.OperationType
Constructor and Description |
---|
CorrectTreeOperation(Address address,
java.lang.Character header,
Result result)
Constructor of the operations CorrectTreeOperation when corrections are
minimal
|
CorrectTreeOperation(Address address,
java.lang.Character header,
Result result,
boolean minimal)
Constructor of the operations CorrectTreeOperation when correction aren't
minimal
|
Modifier and Type | Method and Description |
---|---|
java.util.Collection<OperationSequence> |
abstractionStrictToAbstractOperationSequences()
Generates a list of OperationSequence that can't contain any Operation
that is Abstract Strict
|
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
|
void |
make(Tree tree)
Makes the Operation on the given Tree
|
java.lang.String |
toCompleteString()
Converts the operation to a string like OperationName[attributes]
|
java.lang.String |
toString()
Converts the operation to a string like OperationName[attributes]
|
org.jdom.Element |
toXmlElement() |
org.jdom.Element |
toXmlElement(VocabTranslator vt) |
isAbstractStrict
isAbstract
addAddressPrefix, getAddress, getOperationString, getOperationType, setAddress
public CorrectTreeOperation(Address address, java.lang.Character header, Result result) throws noMinimalTreeException
address
- Address of the Node that should be replacedheader
- Character of the root of the Tree to createresult
- Result to usenoMinimalTreeException
- Throws this exception if there isn't any minimal tree for
this headerpublic CorrectTreeOperation(Address address, java.lang.Character header, Result result, boolean minimal) throws noMinimalTreeException
address
- Address of the Node that should be replacedheader
- Character of the root of the Tree to createresult
- Result to usenoMinimalTreeException
- Throws this exception if there isn't any minimal tree for
this headerpublic java.util.Collection<OperationSequence> abstractionStrictToAbstractOperationSequences()
AbstractUpdateOperation
abstractionStrictToAbstractOperationSequences
in class AbstractUpdateOperation
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 abstractOperationException
Operation
make
in class Operation
tree
- Tree where the Operation should be doneabstractOperationException
- Throws this exception if the Operation is an Abstract
operation like AddMinimalTreeOperationpublic int getCost(Tree tree)
Operation
public Operation clone()
Operation
public boolean equals(java.lang.Object o)
Operation
public int hashCode()
Operation
public java.lang.String toCompleteString()
Operation
toCompleteString
in class Operation
public java.lang.String toString()
Operation
public org.jdom.Element toXmlElement()
toXmlElement
in class Operation
public org.jdom.Element toXmlElement(VocabTranslator vt)
toXmlElement
in class Operation