package bridge; public class Command { protected List<String> errors; protected CommandImpl impl; public Command(CommandImpl impl) { super(); this.impl = impl; this.errors = new ArrayList<String>(); } public boolean Execute() { boolean res = impl.Exec(); if (impl.GetError() != null) { errors.add(impl.GetError()); } return res; } return errors.toString(); } }