Skip to content

Instantly share code, notes, and snippets.

@jeremyroman
Created September 25, 2011 15:02
Show Gist options
  • Save jeremyroman/1240690 to your computer and use it in GitHub Desktop.
Save jeremyroman/1240690 to your computer and use it in GitHub Desktop.
Repetition
public class BananaMerchant {
private final BananaFactory bananaFactory;
private final ShippingAgent shippingAgent;
private final PricingBroker pricingBroker;
private final List<Banana> bananas;
private final Map<Integer, Customer> customerMap;
public BananaMerchant(
final BananaFactory bananaFactory,
final ShippingAgent shippingAgent,
final PricingBroker pricingBroker) {
this.bananaFactory = bananaFactory;
this.shippingAgent = shippingAgent;
this.pricingBroker = pricingBroker;
this.bananas = new ArrayList<Banana>();
this.customerMap = new HashMap<Integer, Customer>();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment