Newer
Older
StockManagement / src / main / java / resources / StockManagement.java
package resources;
import java.util.*;

public class StockManagement {
	private Stock stock;
	private Deriver deriver;
	private Shortage shortage;
	private Available available;
	private Arrival arrival;
	private Shipping shipping;
	private Request request;
	public StockManagement() {
		stock = new Stock();
		deriver = new Deriver(stock);
		shortage = new Shortage();
		available = new Available(shortage,deriver);
		arrival = new Arrival(available,stock);
		shipping = new Shipping(deriver);
		request = new Request(shortage,deriver,stock);
	}
	public void arrive(int num, String item) {
		this.arrival.arrive(num, item);
	}
	public void req(int num, String item) {
		this.request.req(num, item);
	}
	public Map.Entry<String, Integer> getRequest() {
		return request.getValue();
	}
	public Map.Entry<String, Integer> getShipping() {
		return shipping.getValue();
	}
	public Map.Entry<String, Integer> getArrival() {
		return arrival.getValue();
	}
	public Map<String, Integer> getShortage() {
		return shortage.getValue();
	}
	public Map.Entry<String, Integer> getAvailable() {
		return available.getValue();
	}
	public Map.Entry<String, Map.Entry<Integer, Integer>> getDeriver() {
		return deriver.getValue();
	}
	public Map<String, Integer> getStock() {
		return stock.getValue();
	}
}