All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.arextest.diff.model.compare.IndexPair Maven / Gradle / Ivy

There is a newer version: 0.2.15
Show newest version
package com.arextest.diff.model.compare;

public class IndexPair {

  int leftIndex;
  int rightIndex;

  public IndexPair(int leftIndex, int rightIndex) {
    this.leftIndex = leftIndex;
    this.rightIndex = rightIndex;
  }

  @Override
  public int hashCode() {
    int result = leftIndex;
    return result + 31 * rightIndex;
  }

  @Override
  public boolean equals(Object obj) {
    if (obj instanceof IndexPair) {
      IndexPair that = (IndexPair) obj;
      return (leftIndex == that.leftIndex) && (rightIndex == that.rightIndex);
    }
    return false;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy