import java.util.Observable; /** * Implements common constructor and update method dictated by * Observer/Observable to enable implicit invocation. * * @author Alexander Schaap * */ public abstract class CircularShifterAbstract implements CircularShifterInterface { private StorageInterface>>> shifted; @Override public void connect( StorageInterface>>> sls) { shifted = sls; } @SuppressWarnings("unchecked") @Override public void update(Observable o, Object line) { // casting necessary due to Observer's general types shifted.add(circularShifts((StorageInterface>) line)); } }