1 17 18 package org.apache.james.transport.matchers; 19 20 import org.apache.mailet.GenericMatcher; 21 import org.apache.mailet.Mail; 22 23 import java.util.Collection ; 24 25 28 public class IsSingleRecipient extends GenericMatcher { 29 30 public Collection match(Mail mail) { 31 if (mail.getRecipients().size() == 1) { 32 return mail.getRecipients(); 33 } else { 34 return null; 35 } 36 } 37 } 38 | Popular Tags |