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.
-
-
Field Summary
Fields Modifier and Type Field Description private V
firstOperand
Vertex of a tree which is the first operand of this operations.private V
secondOperand
Vertex of a tree which is a second operand of this operation.private ZhangShashaTreeEditDistance.OperationType
type
Type of this operation.
-
Constructor Summary
Constructors Constructor Description EditOperation(ZhangShashaTreeEditDistance.OperationType type, V firstOperand, V secondOperand)
Constructs an instance of edit operation for the giventype
,firstOperand
andsecondOperand
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
V
getFirstOperand()
Returns first operand of this operationV
getSecondOperand()
Returns second operand of this operation.ZhangShashaTreeEditDistance.OperationType
getType()
Returns type of this operation.int
hashCode()
java.lang.String
toString()
-
-
-
Field Detail
-
type
private final ZhangShashaTreeEditDistance.OperationType type
Type of this operation.
-
firstOperand
private final V firstOperand
Vertex of a tree which is the first operand of this operations.
-
secondOperand
private final V secondOperand
Vertex of a tree which is a second operand of this operation. ForOperationsType.INSERT
andOperationsType.REMOVE
this field is null.
-
-
Constructor Detail
-
EditOperation
public EditOperation(ZhangShashaTreeEditDistance.OperationType type, V firstOperand, V secondOperand)
Constructs an instance of edit operation for the giventype
,firstOperand
andsecondOperand
.- Parameters:
type
- type of the operationfirstOperand
- first operand of the operationsecondOperand
- second operand of the operation
-
-
Method Detail
-
getType
public ZhangShashaTreeEditDistance.OperationType getType()
Returns type of this operation.- Returns:
- oeration type
-
getFirstOperand
public V getFirstOperand()
Returns first operand of this operation- Returns:
- first operand
-
getSecondOperand
public V getSecondOperand()
Returns second operand of this operation.- Returns:
- second operand
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-