Created
December 17, 2011 05:43
-
-
Save dhinojosa/1489371 to your computer and use it in GitHub Desktop.
John's thinking
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public interface Foo { | |
public void setBar(Bar bar); | |
} | |
public class FooFactory { | |
private List<Foo> foos; | |
public void setFoos(List<Foo> foos) { | |
this.foos = foos; | |
} | |
public void setBar(Bar bar) { | |
this.bar = bar; | |
} | |
public List<Foo> fulfill() { | |
List<Foo> result = new ArrayList<Foo>(); | |
for (Foo foo: foos) { | |
result.add(foo.setBar(bar)); | |
} | |
return result; | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment