class ChunkTag {

  private final String chunkTag;
  private final boolean isRegexp;

  public ChunkTag(String chunkTag) {
    this(chunkTag, false);
  }

  /** @since 5.1 */
  public ChunkTag(String chunkTag, boolean isRegexp) {
    if (chunkTag == null || chunkTag.trim().isEmpty()) {
      throw new IllegalArgumentException("chunkTag cannot be null or empty: '" + chunkTag + "'");
    }
    this.chunkTag = chunkTag;
    this.isRegexp = isRegexp;
  }

  public String getChunkTag() {
    return chunkTag;
  }

  /** @since 5.1 */
  public boolean isRegexp() {
    return isRegexp;
  }

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

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

  @Override
  public String toString() {
    return chunkTag + (isRegexp ? "[regex]" : "");
  }
}

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