Class ZhangShashaTreeEditDistance.EditOperation<V>

  • Type Parameters:
    V - tree vertex type
    Enclosing class:
    ZhangShashaTreeEditDistance<V,​E>

    public static class ZhangShashaTreeEditDistance.EditOperation<V>
    extends Object
    Represents elementary action which changes the structure of a tree.
    • Constructor Detail

      • EditOperation

        public EditOperation​(ZhangShashaTreeEditDistance.OperationType type,
                             V firstOperand,
                             V secondOperand)
        Constructs an instance of edit operation for the given type, firstOperand and secondOperand.
        Parameters:
        type - type of the operation
        firstOperand - first operand of the operation
        secondOperand - second operand of the operation
    • Method Detail

      • 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
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object