package lawOfDemeter; import java.util.*; /** * The Supplier class is a super class for the bin aspects. * It provides common functionality around a HashMap (targets) * that keeps track of the preferred supplier objects stored in the * various bins. * * @author David H. Lorenz * @author Modifications made by Paul Freeman */ abstract class Supplier { boolean contains(Object target) { if (targets.containsKey(target)) { // System.out.println(" target found " + // targets.get(target) +" object id " + target.toString()); return true; } return false; } void add(Object target,String i) { targets.put(target,i); } void addAll(Object[] targetlist,String i) { for (int k=0; k