Serge Knystautas wrote:
>
> Stefano Mazzocchi wrote:
> > > Mail[] match(Mail mail);
> > >
> > > The method return two Mail object, [0] is the part of the incoming mail
> > > matching the condition implemented by this specific matcher, the seconf
> > > is the part not matching. One, but not both, mail returned can be null
> > > if no recipient in the mail match condition or all match it.
> >
> > Yuck, do we really need to use arrays of two elements for this? What
> > about a nice wrapper class?
>
> What about just...
>
> Mail match(Mail mail);
>
Ok for me. I just can't remember why I used Mail[]...
I mean Matcher can be a bit more efficient in splitting the Mail... I
mean if I'm checking the sender in a 1000 recipient Mail the matcher
know that either all or none will be valid while the matcher caller must
compare the original Mail recipient list every time... but I don't think
it's going to make a big difference.
> If there are recipients that don't match, remove them from the Mail
> object. If nothing matches, the Match object can either return null or
> remove all the recipients. The mail server can then determine how to
> fork the messages accordingly.
>
> Serge Knystautas
> Loki Technologies
> http://www.lokitech.com/
>
--
Federico Barbieri
<[EMAIL PROTECTED]>
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/>
Problems?: [EMAIL PROTECTED]