Module org.jgrapht.core
Package org.jgrapht.alg.similarity
Class ZhangShashaTreeEditDistance.EditOperation<V>
java.lang.Object
org.jgrapht.alg.similarity.ZhangShashaTreeEditDistance.EditOperation<V>
- Type Parameters:
V- tree vertex type
- Enclosing class:
- ZhangShashaTreeEditDistance<V,E>
public static class ZhangShashaTreeEditDistance.EditOperation<V>
extends java.lang.Object
Represents elementary action which changes the structure of a tree.
-
Constructor Summary
Constructors Constructor Description EditOperation(ZhangShashaTreeEditDistance.OperationType type, V firstOperand, V secondOperand)Constructs an instance of edit operation for the giventype,firstOperandandsecondOperand. -
Method Summary
Modifier and Type Method Description booleanequals(java.lang.Object o)VgetFirstOperand()Returns first operand of this operationVgetSecondOperand()Returns second operand of this operation.ZhangShashaTreeEditDistance.OperationTypegetType()Returns type of this operation.inthashCode()java.lang.StringtoString()
-
Constructor Details
-
EditOperation
public EditOperation(ZhangShashaTreeEditDistance.OperationType type, V firstOperand, V secondOperand)Constructs an instance of edit operation for the giventype,firstOperandandsecondOperand.- Parameters:
type- type of the operationfirstOperand- first operand of the operationsecondOperand- second operand of the operation
-
-
Method Details
-
getType
Returns type of this operation.- Returns:
- oeration type
-
getFirstOperand
Returns first operand of this operation- Returns:
- first operand
-
getSecondOperand
Returns second operand of this operation.- Returns:
- second operand
-
equals
public boolean equals(java.lang.Object o)- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-