package gzz.modules.email; import gzz.potion.*; import gzz.potion.potions.*; import java.util.*; import gzz.vob.linebreaking.HChain; import gzz.*; import gzz.zzutil.*; public class AllEmailsThat extends AbstractHead implements Function { public AllEmailsThat() { super(new Object[] { "Return all E-Mails that ", Types.FILTER}); } public List evaluate(List[] params, Map context) { List filteredEmails = new ArrayList(); Space sp = (Space)context.get(Space.class); Cell home = sp.getHomeCell(); Dim d_email = sp.getDim(Ids.d_email); Cell c = home.s(d_email,1); for(Iterator i=params[0].iterator(); i.hasNext();) { Filter f = (Filter)i.next(); while(c != null){ if(f.filter(c)) filteredEmails.add(c); c=c.s(d_email,1); } } return filteredEmails; } }