Trying to do something like:
public interface Order {
public List<? extends OrderItem> getItems();
public void setItems(List<? extends OrderItem> items);
}
public interface OrderItem {
// stuff
}
public calss OrderItemImp implements OrderItem {
// stuff
}
public class OrderImp implements Order {
public List<OrderItemImp> getItems() {
return items;
}
public void setItems(List<OrderItemImp> items) {
this.items = items;
}
}
Compiler complaining about setItems method. How can I make this work? Thanks.