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

org.pitest.classinfo.ClassIdentifier Maven / Gradle / Ivy

There is a newer version: 1.17.1
Show newest version
package org.pitest.classinfo;

import java.io.Serializable;
import java.util.Objects;

public final class ClassIdentifier implements Serializable {

  private static final long serialVersionUID = 1L;

  private final long      hash;
  private final ClassName name;

  public ClassIdentifier(final long hash, final ClassName name) {
    this.hash = hash;
    this.name = name;
  }

  public long getHash() {
    return this.hash;
  }

  public ClassName getName() {
    return this.name;
  }

  @Override
  public int hashCode() {
    return Objects.hash(hash, name);
  }

  @Override
  public boolean equals(final Object obj) {
    if (this == obj) {
      return true;
    }
    if (obj == null || getClass() != obj.getClass()) {
      return false;
    }
    final ClassIdentifier other = (ClassIdentifier) obj;
    return hash == other.hash
            && Objects.equals(name, other.name);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy