File Source: Topic.java
/*
P/P * Method: com.dmdirc.Topic__static_init
*/
1 /*
2 * Copyright (c) 2006-2009 Chris Smith, Shane Mc Cormack, Gregory Holmes
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a copy
5 * of this software and associated documentation files (the "Software"), to deal
6 * in the Software without restriction, including without limitation the rights
7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8 * copies of the Software, and to permit persons to whom the Software is
9 * furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20 * SOFTWARE.
21 */
22
23 package com.dmdirc;
24
25 /**
26 * Stores information about a channel topic.
27 *
28 * @author chris
29 */
30 public class Topic {
31
32 /** Topic. */
33 private final String topic;
34 /** Topic client. */
35 private final String client;
36 /** Topic time. */
37 private final long time;
38
39 /**
40 * Creates a new topic.
41 *
42 * @param topic Topic
43 * @param client Topic client
44 * @param time Topic time
45 */
/*
P/P * Method: void com.dmdirc.Topic(String, String, long)
*
* Postconditions:
* this.client == client
* init'ed(this.client)
* this.time == time
* init'ed(this.time)
* this.topic == topic
* init'ed(this.topic)
*/
46 public Topic(final String topic, final String client, final long time) {
47 this.topic = topic;
48 this.client = client;
49 this.time = time;
50 }
51
52 /**
53 * Returns the client who set the topic.
54 *
55 * @return client host
56 */
57 public String getClient() {
/*
P/P * Method: String getClient()
*
* Postconditions:
* return_value == this.client
* init'ed(return_value)
*/
58 return client;
59 }
60
61 /**
62 * Returns the time the topic was set.
63 *
64 * @return topic time
65 */
66 public long getTime() {
/*
P/P * Method: long getTime()
*
* Postconditions:
* return_value == this.time
* init'ed(return_value)
*/
67 return time;
68 }
69
70 /**
71 * Returns the topic this object represents.
72 *
73 * @return topic
74 */
75 public String getTopic() {
/*
P/P * Method: String getTopic()
*
* Postconditions:
* return_value == this.topic
* init'ed(return_value)
*/
76 return topic;
77 }
78
79 /** {@inheritDoc} */
80 @Override
81 public String toString() {
/*
P/P * Method: String toString()
*
* Postconditions:
* return_value == this.topic
* init'ed(return_value)
*/
82 return topic;
83 }
84
85 }
SofCheck Inspector Build Version : 2.17854
| Topic.java |
2009-Jun-25 01:54:24 |
| Topic.class |
2009-Sep-02 17:04:12 |