1 36 package org.columba.ristretto.imap; 37 38 45 public class ListInfo implements Comparable { 46 47 50 public static final int NOINFERIORS = 1; 51 52 55 public static final int NOSELECT = 2; 56 57 60 public static final int MARKED = 4; 61 62 65 public static final int UNMARKED = 8; 66 67 protected String mailboxName; 68 protected String delimiter; 69 protected int parameters; 70 71 78 public ListInfo(String name, String delimiter, int parameters) { 79 this.mailboxName = name; 80 this.delimiter = delimiter; 81 this.parameters = parameters; 82 } 83 84 89 public String getName() { 90 return mailboxName; 91 } 92 93 98 public boolean isSelectable() { 99 return !getParameter(NOSELECT); 100 } 101 102 108 public String getDelimiter() { 109 return delimiter; 110 } 111 112 118 public boolean getParameter(int parameter) { 119 return (parameters & parameter) > 0; 120 } 121 122 125 public int compareTo(Object arg0) { 126 return mailboxName.compareTo(((ListInfo)arg0).getName()); 127 } 128 129 } 130 | Popular Tags |