package de.ivu.elect.dokumente;

import java.util.Arrays;

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

  private final Object[] parameters;

  public ParameterKey(Object... parameters){
    this.parameters = parameters;
  }

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

    ParameterKey that = (ParameterKey) o;

    // Probably incorrect - comparing Object[] arrays with Arrays.equals
    return Arrays.equals(parameters, that.parameters);

  }


  @Override
  public int hashCode() {
    return Arrays.hashCode(parameters);
  }
}
