On 8/19/11 12:38 PM, [email protected] wrote:
> I still believe that the case where you just have one
> EvaluationSampleListener object that
> should be hooked up is the most frequent use case, and its very rare that
> people want to
> hookup multiple.
>
> To make that easy, I suggest that we add a constructor which just takes one
> listener.
>
Should we do it to all XYEvaluators or only with the Evaluator class? It is
a lot of new constructors!
I saw your changes now. With a variable length param it would look much
nicer,
because then we would only need on constructor, instead of three.
The reason why we don't use them here was that we cannot create an array
of a parametrized
type in java, anyway it would be possible but then it is not type-safe
and we get a compiler
warning.
To make it type safe we would need to define an interface like this one:
TokenizerEvaluationMonitor implements EvaluationMonitor<TokenSample>
If we use such an interface we loos a bit of flexibility, in the end it
is a trade off
between using variable length params in our constructors, or to have
this little
bit more flexibility.
Variable length parms in our constructors, might also be slightly more
convenient to use.
Jörn