1 package org.paneris.jammyjoes.mvp; 2 3 import java.util.Vector; 4 5 import org.paneris.jammyjoes.model.Graphable; 6 7 public class CopyIntoContextCommand implements Command { 8 9 private final Vector _results; 10 private AffiliateTotals totals; 11 12 public CopyIntoContextCommand(Vector _results, AffiliateTotals totals) { 13 this._results = _results; 14 this.totals = totals; 15 } 16 17 public Object visit(Object visited) { 18 Graphable item = (Graphable) visited; 19 _results.add(item); 20 item.total(totals); 21 return item; 22 } 23 24 public void lastInteraction() { 25 } 26 27 }