package jmri; import java.beans.PropertyChangeListener; import java.util.Arrays; import java.util.List; import javax.annotation.Nonnull; /** * Scaffold implementation of Programmer interface for testing. * *
* JMRI is free software; you can redistribute it and/or modify it under the * terms of version 2 of the GNU General Public License as published by the Free * Software Foundation. See the "COPYING" file for a copy of this license. *
* JMRI is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* @see jmri.Programmer
* @author Bob Jacobsen Copyright (C) 2008, 2014
*/
public class ProgrammerScaffold implements Programmer {
ProgrammingMode matchesMode;
ProgrammingMode lastSeenMode;
public ProgrammerScaffold(ProgrammingMode matchesMode) {
this.matchesMode = matchesMode;
this.lastSeenMode = matchesMode;
}
@Override
public void writeCV(String CV, int val, ProgListener p) throws ProgrammerException {}
@Override
public void readCV(String CV, ProgListener p) throws ProgrammerException {}
@Override
public void confirmCV(String CV, int val, ProgListener p) throws ProgrammerException {}
@Override
public void setMode(ProgrammingMode p) {
// temporary implementation, have to remove the "mode" int value eventually
lastSeenMode = p;
}
@Override
public ProgrammingMode getMode() {
return lastSeenMode;
}
@Nonnull
@Override
public List