aspose file tools*
The moose likes OO, Patterns, UML and Refactoring and the fly likes Design Query Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Design Query" Watch "Design Query" New topic
Author

Design Query

Muhammad Khojaye
Ranch Hand

Joined: Apr 12, 2009
Posts: 449

Is it good idea to implement Adapter pattern if both Client interface and adaptee has same return type but the only difference is that adaptee return the array of that object? Can we implement it using Adapter?


http://muhammadkhojaye.blogspot.com/
Winston Gutkowski
Bartender

Joined: Mar 17, 2011
Posts: 7653
    
  19

Muhammad Khojaye wrote:Is it good idea to implement Adapter pattern if both Client interface and adaptee has same return type but the only difference is that adaptee return the array of that object? Can we implement it using Adapter?

I think you'll have to provide more information than that.

An example might help, or simply an explanation of what you're trying to do.

Also: If something needs to return an array, isn't it already a collection of some kind?

Winston

Isn't it funny how there's always time and money enough to do it WRONG?
Articles by Winston can be found here
 
Don't get me started about those stupid light bulbs.
 
subject: Design Query