package de.ivu.elect.dokumente;

/**
 *  on 05.05.2015.
 */
public class DocumentClassParameterKey {

  private final Class<?> clazz;
  private final ParameterKey parameterKey;

  public DocumentClassParameterKey(Class<?> clazz, ParameterKey parameterKey) {
    this.clazz = clazz;
    this.parameterKey = parameterKey;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;

    DocumentClassParameterKey that = (DocumentClassParameterKey) o;

    if (!clazz.equals(that.clazz)) return false;
    return parameterKey.equals(that.parameterKey);

  }

  @Override
  public int hashCode() {
    int result = clazz.hashCode();
    result = 31 * result + parameterKey.hashCode();
    return result;
  }
}
