org.ofbiz.workeffort.workeffort.WorkEffortSearch

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

org.ofbiz.workeffort.workeffort.WorkEffortSearch

Adam Heath-2
Is there any particular reason why several of the methods in this class
return an *ArrayList*, instead of just a *List*?

And in the more general case, shouldn't all methods return generic
classes?  Map instead of HashMap or TreeMap, List instead of
ArrayList/LinkedList, etc?
Reply | Threaded
Open this post in threaded view
|

Re: org.ofbiz.workeffort.workeffort.WorkEffortSearch

Adrian Crum
Personally, I prefer passing around interfaces.

-Adrian

Adam Heath wrote:
> Is there any particular reason why several of the methods in this class
> return an *ArrayList*, instead of just a *List*?
>
> And in the more general case, shouldn't all methods return generic
> classes?  Map instead of HashMap or TreeMap, List instead of
> ArrayList/LinkedList, etc?
>
Reply | Threaded
Open this post in threaded view
|

Re: org.ofbiz.workeffort.workeffort.WorkEffortSearch

Jacques Le Roux
Administrator
+1, more general, more evolutive

Jacques

From: "Adrian Crum" <[hidden email]>

> Personally, I prefer passing around interfaces.
>
> -Adrian
>
> Adam Heath wrote:
>> Is there any particular reason why several of the methods in this class
>> return an *ArrayList*, instead of just a *List*?
>>
>> And in the more general case, shouldn't all methods return generic
>> classes?  Map instead of HashMap or TreeMap, List instead of
>> ArrayList/LinkedList, etc?
>>
>