Hi & wait a sec, you cannot just "let the other methods unimplemented",
the code will not compile. All interface methods must be implemented,
the bodies of void methods can be empty, others and can return nulls and
0's or throw exceptions, sure, but that seems confusing. 

It seems simpler to have an interface with one method than to explain
that the resolver is a Map, but not really, and that, today, only this
here methods needs to be implemented. Or am I missing something?

Gary
-----Original Message-----
From: Emmanuel Bourg [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 28, 2005 6:26 PM
To: Jakarta Commons Developers List
Subject: Re: [lang] text.Interpolation, on to 2.2

Simon Kitching wrote:

> You mean that someone with special resolving requirements should
provide
> a custom class that implements Map?

Yes that's what I mean.


> However for the other cases the user has to implement the Map
interface
> which it's quite a lot of work. As the resolve method actually uses
only
> the "get" method on the map it seems a shame to require the user to
> implement the full Map interface.

On the other hand, if the resolve method guarantees that it will only 
use the get() method from the Map interface, the user is free to let the

other methods unimplemented. The hint could be included in the javadoc, 
this should be enough for the minority of users interested in 
implementing a custom variable resolution.

Emmanuel Bourg


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to