]> git.somenet.org - irc/pjirc-ng.git/blob - src/main/java/irc/IRCObject.java
Pjirc 2.2.1 as available on the net, reformatted and made it compile.
[irc/pjirc-ng.git] / src / main / java / irc / IRCObject.java
1 /*****************************************************/\r
2 /*          This java file is a part of the          */\r
3 /*                                                   */\r
4 /*           -  Plouf's Java IRC Client  -           */\r
5 /*                                                   */\r
6 /*   Copyright (C)  2002 - 2005 Philippe Detournay   */\r
7 /*                                                   */\r
8 /*         All contacts : theplouf@yahoo.com         */\r
9 /*                                                   */\r
10 /*  PJIRC is free software; you can redistribute     */\r
11 /*  it and/or modify it under the terms of the GNU   */\r
12 /*  General Public License as published by the       */\r
13 /*  Free Software Foundation; version 2 or later of  */\r
14 /*  the License.                                     */\r
15 /*                                                   */\r
16 /*  PJIRC is distributed in the hope that it will    */\r
17 /*  be useful, but WITHOUT ANY WARRANTY; without     */\r
18 /*  even the implied warranty of MERCHANTABILITY or  */\r
19 /*  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU   */\r
20 /*  General Public License for more details.         */\r
21 /*                                                   */\r
22 /*  You should have received a copy of the GNU       */\r
23 /*  General Public License along with PJIRC; if      */\r
24 /*  not, write to the Free Software Foundation,      */\r
25 /*  Inc., 59 Temple Place, Suite 330, Boston,        */\r
26 /*  MA  02111-1307  USA                              */\r
27 /*                                                   */\r
28 /*****************************************************/\r
29 \r
30 package irc;\r
31 \r
32 /**\r
33  * Root IRC Object.\r
34  */\r
35 public class IRCObject {\r
36         /**\r
37          * The global IRC configuration.\r
38          */\r
39         protected IRCConfiguration _ircConfiguration;\r
40 \r
41         /**\r
42          * Create a new IRCObject.\r
43          * \r
44          * @param ircConfiguration\r
45          *          the global irc configuration.\r
46          */\r
47         public IRCObject(IRCConfiguration ircConfiguration) {\r
48                 _ircConfiguration = ircConfiguration;\r
49         }\r
50 \r
51         /**\r
52          * get the irc configuration.\r
53          * \r
54          * @return the global irc configuration.\r
55          */\r
56         public IRCConfiguration getIRCConfiguration() {\r
57                 return _ircConfiguration;\r
58         }\r
59 \r
60         /**\r
61          * Release this object. No further method call can be performed on this\r
62          * object.\r
63          */\r
64         public void release() {\r
65                 // empty default implementation\r
66         }\r
67 \r
68         /**\r
69          * Get formatted text associated with the given text code, with no parameter.\r
70          * \r
71          * @param code\r
72          *          text code.\r
73          * @return formatted text.\r
74          */\r
75         public String getText(int code) {\r
76                 return _ircConfiguration.getText(code);\r
77         }\r
78 \r
79         /**\r
80          * Get formatted text associated with the given text code, with one parameter.\r
81          * \r
82          * @param code\r
83          *          text code.\r
84          * @param p1\r
85          *          first parameter.\r
86          * @return formatted text.\r
87          */\r
88         public String getText(int code, String p1) {\r
89                 return _ircConfiguration.getText(code, p1);\r
90         }\r
91 \r
92         /**\r
93          * Get formatted text associated with the given text code, with two\r
94          * parameters.\r
95          * \r
96          * @param code\r
97          *          text code.\r
98          * @param p1\r
99          *          first parameter.\r
100          * @param p2\r
101          *          second parameter.\r
102          * @return formatted text.\r
103          */\r
104         public String getText(int code, String p1, String p2) {\r
105                 return _ircConfiguration.getText(code, p1, p2);\r
106         }\r
107 \r
108         /**\r
109          * Get formatted text associated with the given text code, with three\r
110          * parameters.\r
111          * \r
112          * @param code\r
113          *          text code.\r
114          * @param p1\r
115          *          first parameter.\r
116          * @param p2\r
117          *          second parameter.\r
118          * @param p3\r
119          *          third parameter.\r
120          * @return formatted text.\r
121          */\r
122         public String getText(int code, String p1, String p2, String p3) {\r
123                 return _ircConfiguration.getText(code, p1, p2, p3);\r
124         }\r
125 }\r