class SubjectIs extends GenericMatcher {

    @Override
    public Collection<MailAddress> match(Mail mail) throws javax.mail.MessagingException {
        MimeMessage mm = mail.getMessage();
        String subject = mm.getSubject();
        if (subject != null && subject.equals(getCondition())) {
            return mail.getRecipients();
        }
        return null;
    }

}