/**
 * Copyright (C) 2013 by Raphael Michel under the MIT license:
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), 
 * to deal in the Software without restriction, including without limitation 
 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 
 * and/or sell copies of the Software, and to permit persons to whom the Software 
 * is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in 
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 
 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, 
 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 
 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 
 * DEALINGS IN THE SOFTWARE.
 */
package de.geeksfactory.opacclient.objects;

/**
 * Object representing a detail of a media item
 *
 * @author Raphael Michel
 */
public class Detail {
    private String desc;
    private String content;
    private boolean html;

    /**
     * Create a new detail
     *
     * @param desc    Description
     * @param content Content
     */
    public Detail(String desc, String content) {
        super();
        this.desc = desc;
        this.content = content;
    }

    /**
     * Create a new detail
     *
     * @param desc    Description
     * @param content Content
     */
    public Detail(String desc, String content, boolean html) {
        super();
        this.desc = desc;
        this.content = content;
        this.html = html;
    }

    /**
     * Get this detail's description
     *
     * @return the description
     */
    public String getDesc() {
        return desc;
    }

    /**
     * Set this detail's description. Description in this context means something like "Title",
     * "Summary".
     *
     * @param desc the description
     */
    public void setDesc(String desc) {
        this.desc = desc;
    }

    /**
     * Get this detail's content.
     *
     * @return the content
     */
    public String getContent() {
        return content;
    }

    /**
     * Set this detail's content. If the description is "Title", this should contain the actual
     * title, like "Harry Potter"
     *
     * @param content the content
     */
    public void setContent(String content) {
        this.content = content;
    }

    /**
     * Returns whether the content is to be treated as HTML or plain text.
     */
    public boolean isHtml() {
        return html;
    }

    /**
     * Set whether the content is to be treated as HTML or plain text.
     */
    public void setHtml(boolean html) {
        this.html = html;
    }

    @Override
    public String toString() {
        return "Detail [desc=" + desc + ", content=" + content + "]";
    }
}

@@ -3153,11 +3153,567 @@
 %22;%0A    %7D
+%0A%0A    @Override%0A    public boolean equals(Object o) %7B%0A        if (this == o) return true;%0A        if (o == null %7C%7C getClass() != o.getClass()) return false;%0A%0A        Detail detail = (Detail) o;%0A%0A        if (html != detail.html) return false;%0A        if (!desc.equals(detail.desc)) return false;%0A        return content.equals(detail.content);%0A%0A    %7D%0A%0A    @Override%0A    public int hashCode() %7B%0A        int result = desc.hashCode();%0A        result = 31 * result + content.hashCode();%0A        result = 31 * result + (html ? 1 : 0);%0A        return result;%0A    %7D
 %0A%7D%0A

implement equals() and hashCode()