100101102103104105106107108109110
item.setName((String)arg0); break; case CATEGORY_COLUMN: if(arg0 instanceof String){ String name = (String) arg0; Category newcat = new Category(name); comboBox.addItem(newcat); item.setCategory(newcat); // data.setElementAt(newcat, arg2); } else{
565758596061626364656667
} public void build(String guts) { String del = MySerialize.delim; StringTokenizer t = new StringTokenizer(guts,del); Category c = new Category(); c.build(t.nextToken()); this.category = c; name = t.nextToken(); MenuPolicy p = new MenuPolicy(); p.build(t.nextToken());
151617181920212223
public class PolicyTest extends TestCase { Item dish; protected void setUp() throws Exception { super.setUp(); dish = new MainDish(new Category("Pasta"), "spaghetti", new PolicyEnum[]{Frequency.BIMONTHLY,Season.WINTER},true,new Date()); }