]> git.somenet.org - irc/pjirc-ng.git/blob - src/main/java/irc/Interpretor.java
Pjirc 2.2.1 as available on the net, reformatted and made it compile.
[irc/pjirc-ng.git] / src / main / java / irc / Interpretor.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 - 2004 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  * A source interpretor.\r
34  */\r
35 public interface Interpretor {\r
36         /**\r
37          * Send the given string to the server.\r
38          * \r
39          * @param s\r
40          *          the source.\r
41          * @param str\r
42          *          the string to send.\r
43          */\r
44         public void sendString(Source s, String str);\r
45 \r
46         /**\r
47          * Set the next interpretor.\r
48          * \r
49          * @param next\r
50          *          interpretor to use. May be null.\r
51          */\r
52         public void setNextInterpretor(Interpretor next);\r
53 \r
54         /**\r
55          * Get the next interpretor.\r
56          * \r
57          * @return the next interpretor, or null if this interpretor is the last.\r
58          */\r
59         public Interpretor getNextInterpretor();\r
60 \r
61         /**\r
62          * Check whether the given interpretor is already in the interpretor chain.\r
63          * \r
64          * @param in\r
65          *          the interpretor to check.\r
66          * @return true if in is in the chain, false otherwise.\r
67          */\r
68         public boolean isInside(Interpretor in);\r
69 \r
70         /**\r
71          * Add the given interpretor at the end of this interpretor chain. If in is\r
72          * already in the chain, nothing is done.\r
73          * \r
74          * @param in\r
75          *          interpretor to add.\r
76          */\r
77         public void addLast(Interpretor in);\r
78 }\r