class AnnotationLine implements Serializable {

    private static final long serialVersionUID = 3402729223485872826L;

    private String revision;
    private String author;
    private boolean enabled;

    private String displayRevision;

    public AnnotationLine() {
        // for serialization
    }

    /**
     * An annotation line where the revision is not overridden for display purposes.
     * @param revision revision string
     * @param author author string
     * @param enabled whether it is enabled
     */
    AnnotationLine(String revision, String author, boolean enabled) {
      this(revision, author, enabled, null);
    }

    AnnotationLine(String revision, String author, boolean enabled, String displayRevision) {
        this.revision = revision == null ? "" : revision;
        this.author = author == null ? "" : author;
        this.enabled = enabled;
        this.setDisplayRevision(displayRevision);
    }

    public String getRevision() {
        return revision;
    }

    public String getAuthor() {
        return author;
    }

    public boolean isEnabled() {
        return enabled;
    }

    public void setRevision(String revision) {
        this.revision = revision;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public void setEnabled(boolean enabled) {
        this.enabled = enabled;
    }

    /**
     * A specialised revision for display purposes.
     *
     * @return the display revision if not null, otherwise the revision.
     */
    public String getDisplayRevision() {
      return displayRevision == null ? revision : displayRevision;
    }

    public void setDisplayRevision(String displayRevision) {
      this.displayRevision = displayRevision;
    }

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

    @Override
    public int hashCode() {
        return Objects.hash(isEnabled(), getAuthor(), getRevision());
    }
}

        return Optional.ofNullable(obj)
                .filter(other -> getClass() == other.getClass())
                .map(AnnotationLine.class::cast)
                .filter(other -> Objects.equals(isEnabled(), other.isEnabled()))
                .filter(other -> Objects.equals(getAuthor(), other.getAuthor()))
                .filter(other -> Objects.equals(getRevision(), other.getRevision()))
                .filter(other -> Objects.equals(getDisplayRevision(), other.getDisplayRevision()))
                .isPresent();
    
<no_super_class>