KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > gnu > mail > providers > imap4 > ListEntry


1 /*
2  * ListEntry.java
3  * Copyright (C) 2003 Chris Burdess <dog@gnu.org>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * You also have permission to link it with the Sun Microsystems, Inc.
11  * JavaMail(tm) extension and run that combination.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21  */

22
23 package gnu.mail.providers.imap4;
24
25 import java.util.List JavaDoc;
26
27 /**
28  * An item in an IMAP LIST or LSUB response.
29  *
30  * @author <a HREF='mailto:dog@gnu.org'>Chris Burdess</a>
31  * @version 0.1
32  */

33 public class ListEntry
34 {
35
36   List JavaDoc attributes;
37
38   char delimiter;
39
40   String JavaDoc mailbox;
41
42   public String JavaDoc toString()
43   {
44     StringBuffer JavaDoc buffer = new StringBuffer JavaDoc();
45     if (attributes!=null)
46     {
47       buffer.append("\u001b[00;35m");
48       buffer.append(attributes);
49       buffer.append("\u001b[00m ");
50     }
51     buffer.append("\"\u001b[00;31m");
52     buffer.append(delimiter);
53     buffer.append("\u001b[00m\" ");
54     buffer.append(mailbox);
55     return buffer.toString();
56   }
57   
58 }
59
Popular Tags