All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.dakusui.jcunit.regex.Reference Maven / Gradle / Ivy

There is a newer version: 0.8.17
Show newest version
package com.github.dakusui.jcunit.regex;

import static com.github.dakusui.jcunit.core.utils.Checks.checknotnull;
import static java.lang.String.format;

class Reference implements Value {
  final String key;

  Reference(String key) {
    this.key = checknotnull(key);
  }

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

  @Override
  public boolean equals(Object another) {
    return another instanceof Reference
        && this.key.equals(((Reference) another).key);
  }

  @Override
  public String toString() {
    return format("Reference:<%s>", this.key);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy