203204205206207208209210
term = new AndTerm(term, newTerm); } else if (op == Op.or) { term = new OrTerm(term, newTerm); } else { // need to and the existing with the not term = new AndTerm(term, new NotTerm(newTerm)); } }
93949596979899100101102103
new OrTerm( new AndTerm( new FromStringTerm("from"), new RecipientStringTerm(Message.RecipientType.TO, "to") ), new NotTerm( new SubjectTerm("subject") ) ), new FromStringTerm("from2") );
123124125126127128129130131132133
new SearchTerm[] { new AndTerm( new FromStringTerm("from"), new RecipientStringTerm(Message.RecipientType.TO, "to") ), new NotTerm( new SubjectTerm("subject") ), new FromStringTerm("from2") } );
178179180181182183184185186
/** * Appends single filter as NOT. */ public EmailFilter not(EmailFilter emailFilter) { SearchTerm searchTerm = new NotTerm(emailFilter.searchTerm); concat(searchTerm); return this; }
190191192193194195196197198199200
/** * Concatenates last search term with new one. */ protected void concat(SearchTerm searchTerm) { if (nextIsNot) { searchTerm = new NotTerm(searchTerm); nextIsNot = false; } if (operatorAnd) { and(searchTerm); } else {