+// Copyright 2000-2005 the Contributors, as shown in the revision logs.
+// Licensed under the Apache Public Source License 2.0 ("the License").
+// You may not use this file except in compliance with the License.
+
package org.ibex.mail;
import java.util.*;
import org.ibex.mail.target.*;
case OR: for(int i=0; i<q.length; i++) if (q[i].match(it)) return true; return false;
case AND: for(int i=0; i<q.length; i++) if (!q[i].match(it)) return false; return true;
case UID: if (set != null) {
- for(int i=0; i<set.length; i+=2) if (set[i] <= it.uid() && set[i+1] >= it.uid()) return true;
+ for(int i=0; i<set.length; i+=2)
+ if (set[i] <= it.uid() && set[i+1] >= it.uid()) return true;
return false; }
else return it.uid() >= min && it.uid() <= max;
case NUM: if (set != null) {
(earliest==null||it.cur().date.after(earliest));
case ARRIVAL: return (latest == null || it.cur().arrival.before(latest)) &&
(earliest == null || it.cur().arrival.after(earliest));
- case SIZE: return it.cur().rfc822size() >= min && it.cur().rfc822size() <= max;
- case HEADER: return it.cur().headers.get(key) != null &&
- ((String)it.cur().headers.get(key)).toLowerCase().indexOf(text.toLowerCase()) != -1;
+ case SIZE: return it.cur().size() >= min && it.cur().size() <= max;
+ case HEADER: return it.cur().headers.gets(key) != null &&
+ ((String)it.cur().headers.gets(key)).toLowerCase().indexOf(text.toLowerCase()) != -1;
case BODY: return it.cur().body.toLowerCase().indexOf(text.toLowerCase()) != -1;
case FULL: return it.cur().body.toLowerCase().indexOf(text.toLowerCase()) != -1 ||
- it.cur().allHeaders.indexOf(text) != -1;
+ it.cur().headers.raw.indexOf(text) != -1;
case DELETED: return it.deleted();
case SEEN: return it.seen();
case FLAGGED: return it.flagged();