//# 0 errors, 57 messages
//#
/*
    //#Topic.java:1:1: class: com.dmdirc.Topic
    //#Topic.java:1:1: method: com.dmdirc.Topic.com.dmdirc.Topic__static_init
 * Copyright (c) 2006-2009 Chris Smith, Shane Mc Cormack, Gregory Holmes
 *
 * 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 com.dmdirc;

/**
 * Stores information about a channel topic.
 *
 * @author chris
 */
public class Topic {

    /** Topic. */
    private final String topic;
    /** Topic client. */
    private final String client;
    /** Topic time. */
    private final long time;

    /**
     * Creates a new topic.
     *
     * @param topic Topic
     * @param client Topic client
     * @param time Topic time
     */
    public Topic(final String topic, final String client, final long time) {
    //#Topic.java:46: method: void com.dmdirc.Topic.com.dmdirc.Topic(String, String, long)
    //#input(void com.dmdirc.Topic(String, String, long)): client
    //#input(void com.dmdirc.Topic(String, String, long)): this
    //#input(void com.dmdirc.Topic(String, String, long)): time
    //#input(void com.dmdirc.Topic(String, String, long)): topic
    //#output(void com.dmdirc.Topic(String, String, long)): this.client
    //#output(void com.dmdirc.Topic(String, String, long)): this.time
    //#output(void com.dmdirc.Topic(String, String, long)): this.topic
    //#post(void com.dmdirc.Topic(String, String, long)): this.client == client
    //#post(void com.dmdirc.Topic(String, String, long)): init'ed(this.client)
    //#post(void com.dmdirc.Topic(String, String, long)): this.time == time
    //#post(void com.dmdirc.Topic(String, String, long)): init'ed(this.time)
    //#post(void com.dmdirc.Topic(String, String, long)): this.topic == topic
    //#post(void com.dmdirc.Topic(String, String, long)): init'ed(this.topic)
        this.topic = topic;
        this.client = client;
        this.time = time;
    }
    //#Topic.java:50: end of method: void com.dmdirc.Topic.com.dmdirc.Topic(String, String, long)

    /**
     * Returns the client who set the topic.
     *
     * @return client host
     */
    public String getClient() {
        return client;
    //#Topic.java:58: method: String com.dmdirc.Topic.getClient()
    //#input(String getClient()): this
    //#input(String getClient()): this.client
    //#output(String getClient()): return_value
    //#post(String getClient()): return_value == this.client
    //#post(String getClient()): init'ed(return_value)
    //#Topic.java:58: end of method: String com.dmdirc.Topic.getClient()
    }

    /**
     * Returns the time the topic was set.
     *
     * @return topic time
     */
    public long getTime() {
        return time;
    //#Topic.java:67: method: long com.dmdirc.Topic.getTime()
    //#input(long getTime()): this
    //#input(long getTime()): this.time
    //#output(long getTime()): return_value
    //#post(long getTime()): return_value == this.time
    //#post(long getTime()): init'ed(return_value)
    //#Topic.java:67: end of method: long com.dmdirc.Topic.getTime()
    }

    /**
     * Returns the topic this object represents.
     *
     * @return topic
     */
    public String getTopic() {
        return topic;
    //#Topic.java:76: method: String com.dmdirc.Topic.getTopic()
    //#input(String getTopic()): this
    //#input(String getTopic()): this.topic
    //#output(String getTopic()): return_value
    //#post(String getTopic()): return_value == this.topic
    //#post(String getTopic()): init'ed(return_value)
    //#Topic.java:76: end of method: String com.dmdirc.Topic.getTopic()
    }

    /** {@inheritDoc} */
    @Override
    public String toString() {
        return topic;
    //#Topic.java:82: method: String com.dmdirc.Topic.toString()
    //#input(String toString()): this
    //#input(String toString()): this.topic
    //#output(String toString()): return_value
    //#post(String toString()): return_value == this.topic
    //#post(String toString()): init'ed(return_value)
    //#Topic.java:82: end of method: String com.dmdirc.Topic.toString()
    }

}
    //#output(com.dmdirc.Topic__static_init): __Descendant_Table[com/dmdirc/Topic]
    //#output(com.dmdirc.Topic__static_init): __Dispatch_Table.getClient()Ljava/lang/String;
    //#output(com.dmdirc.Topic__static_init): __Dispatch_Table.getTime()J
    //#output(com.dmdirc.Topic__static_init): __Dispatch_Table.getTopic()Ljava/lang/String;
    //#output(com.dmdirc.Topic__static_init): __Dispatch_Table.toString()Ljava/lang/String;
    //#post(com.dmdirc.Topic__static_init): __Descendant_Table[com/dmdirc/Topic] == &__Dispatch_Table
    //#post(com.dmdirc.Topic__static_init): __Dispatch_Table.getClient()Ljava/lang/String; == &getClient
    //#post(com.dmdirc.Topic__static_init): __Dispatch_Table.getTime()J == &getTime
    //#post(com.dmdirc.Topic__static_init): __Dispatch_Table.getTopic()Ljava/lang/String; == &getTopic
    //#post(com.dmdirc.Topic__static_init): __Dispatch_Table.toString()Ljava/lang/String; == &toString
    //#Topic.java:: end of method: com.dmdirc.Topic.com.dmdirc.Topic__static_init
    //#Topic.java:: end of class: com.dmdirc.Topic
