2 * A FilterResult encapsulates the result of a filter made by checking a mail.
4 public class FilterResult {
6 * This value is used if type is ERROR or UNKNOWN.
8 public double NO_RESULT;
11 * A result value greater or equal this value indicates that the filter has
14 public double SPAM_THRESHOLD;
15 public double ABSOLUTE_SPAM;
16 public double ABSOLUTE_HAM;
18 //TODO decide a good way of deciding
19 public double result; // the result, a value between 0 (ham) and 1 (spam), negative values for "error", "unknown" etc.
21 //public HashMap<String,String> properties = new HashMap<String,String>(); // additional properties of the filter (mainly for statistics)
23 // -----------------------------------------------------------------------------
25 public FilterResult(double result) {
33 public double getResult() {
37 public boolean isSpam() {
38 return result >= SPAM_THRESHOLD;
42 public void addProperty(String key, String value) {
43 properties.put(key,value);
46 public String getProperty(String key) {
47 return properties.get(key);
50 public HashMap<String,String> getProperties() {