Fellow FOP developers,

would you mind using the interface instead of the implementation where
possible? Map instead of HashMap, List instead of ArrayList. I've seen
this habit in a number of places and not only by Keiron! I've made it a
habit to follow this pattern:

import java.util.List;

[..]

private List myvalues = new java.util.ArrayList();

ArrayList never gets imported. That makes it easier to switch between
implementation, for example if you have to switch between the
unsynchronized ArrayList and the synchronized Vector. The decision which
implementation to take should happen at one place in the code, not at
many places. For Map there exist new implementations in Jakarta Commons
Collections, for example. A method that takes List parameters (instead
of ArrayList) is more universal.

Thank you all!

On 6 Nov 2002 15:07:04 -0000 keiron wrote:
>   +
>   +    /**
>   +     * Traits for this area stored in a HashMap
>   +     */
>   +    protected HashMap props = null;

Jeremias Maerki


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

Reply via email to