class CategoryId {
  
  private final String id;

  public CategoryId(String id) {
    Objects.requireNonNull(id, "Category id must not be null.");
    if (id.trim().isEmpty()) {
      throw new IllegalArgumentException("Category id must not be empty: '" + id + "'");
    }
    this.id = id;
  }

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

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

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

    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    CategoryId other = (CategoryId) o;
    return id.equals(other.id);
  
<no_super_class>