package edu.neu.ccs.csu670.components.knapsacksolver; /** * Represents an item to be used by the {@link KnapsackSolver} * * @author David Halperin (halperin.dr@gmail.com) */ public interface KnapsackItem { /** * @returns the cost of putting the item in the knapsack, where * the knapsack solver will be given some total amount that * can be put in the knapsack. */ public double getWeight(); /** * @return how much it's worth having the item in the knapsack */ public double getValue(); /** * @return the concrete item that is being associated with the * weight and value fields for use in the problem. */ public T getItem(); }