package de.croesch.diff.subject;

import de.croesch.diff.subject.api.Subject;

/**
 * The basic implementation of a Subject, contains code that all Subjects share.
 *
 * @param <CT> the type of the content this subject represents
 */
public abstract class BasicSubject<CT extends Object> implements Subject {
  /** the representation of the value/content of this subject. */
  private CT content;

  public BasicSubject(CT ct) {
    content = ct;
  }

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

  @Override
  public boolean equals(Object obj) {
    if (!(obj instanceof BasicSubject)) {
      return false;
    }
    return content.equals(((BasicSubject) obj).content);
  }

  protected CT getContent() {
    return content;
  }
}

@@ -752,11 +752,109 @@
 ent;%0A  %7D
+%0A%0A  @Override%0A  public String toString() %7B%0A    return super.toString() + %22 %3E%22 + content + %22%3C%22;%0A  %7D
 %0A%7D%0A

Implement toString() for debug purposes.