2 package saccubus.converter;
4 import saccubus.ConvertStopFlag;
5 import saccubus.net.TextProgressListener;
11 public abstract class AbstractCommand {
13 private final TextProgressListener listener;
14 private final ConvertStopFlag StopFlag;
16 public AbstractCommand(TextProgressListener listener, ConvertStopFlag StopFlag) {
17 this.listener = listener;
18 this.StopFlag = StopFlag;
21 protected void stopFlagReturn() throws InterruptedException {
22 if (getStopFlag().needStop()) {
23 throw new InterruptedException("中止しました。");
27 protected void sendText(String text) {
28 getListener().setText(text);
32 * @return the listener
34 protected TextProgressListener getListener() {
39 * @return the StopFlag
41 protected ConvertStopFlag getStopFlag() {