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

net.stickycode.exception.resolver.TextFragment Maven / Gradle / Ivy

Go to download

A clean exception base class(s) with a signature closer to slf4j, so that messages can be as nicely descriptive

There is a newer version: 3.2
Show newest version
package net.stickycode.exception.resolver;

public class TextFragment
    extends Fragment {

  private String value;

  public TextFragment(String value) {
    this.value = value;
  }

  @Override
  public String getValue() {
    return value;
  }

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

  @Override
  public boolean equals(Object obj) {
    if (this == obj)
      return true;
    if (getClass() != obj.getClass())
      return false;
    TextFragment other = (TextFragment) obj;
    return value.equals(other.value);
  }

  @Override
  public String toString() {
    return super.toString() + "[" + value + "]";
  }

  @Override
  public boolean isText() {
    return true;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy