class Key implements Comparable<Key> {

  private final String name;

  public Key(String name) {
    this.name = name;
  }

  @Override
  public boolean equals(Object o) {<FILL_FUNCTION_BODY>}

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

  @Override
  public int compareTo(Key o) {
    return name.compareTo(o.name);
  }

  @Override
  public String toString() {
    return name;
  }
}

    if (this == o)
      return true;
    if (o == null || getClass() != o.getClass())
      return false;
    Key key = (Key) o;
    return Objects.equals(name, key.name);
  
<no_super_class>