OSDN Git Service

shouldRunメソッドをインタフェースから削除
authoryukihane <yukihane.feather@gmail.com>
Sat, 25 Jun 2011 05:58:28 +0000 (14:58 +0900)
committeryukihane <yukihane.feather@gmail.com>
Sat, 25 Jun 2011 05:58:28 +0000 (14:58 +0900)
frontend/src/saccubus/converter/Converter.java
frontend/src/saccubus/converter/classic/profile/Profile.java
frontend/src/saccubus/converter/profile/Profile.java

index 2e25078..d80a9f9 100644 (file)
@@ -75,7 +75,7 @@ public class Converter extends AbstractCommand implements Runnable, Callable<Boo
     }
 
     private boolean runConvert() throws IOException, InterruptedException {
     }
 
     private boolean runConvert() throws IOException, InterruptedException {
-        if (!profile.shouldRun()) {
+        if (!shouldRun(profile)) {
             sendText("何もすることがありません");
             return true;
         }
             sendText("何もすることがありません");
             return true;
         }
@@ -221,4 +221,9 @@ public class Converter extends AbstractCommand implements Runnable, Callable<Boo
     public ConvertStopFlag getStopFlag() {
         return super.getStopFlag();
     }
     public ConvertStopFlag getStopFlag() {
         return super.getStopFlag();
     }
+
+    /** @return 何か実行すべき処理があればtrue. */
+    private static boolean shouldRun(Profile profile) {
+        return profile.getOutputFileSetting().isConvert() || profile.needsDownload();
+    }
 }
 }
index 4f76fac..398b342 100644 (file)
@@ -42,12 +42,6 @@ public class Profile implements saccubus.converter.profile.Profile {
         return loginInfo;
     }
 
         return loginInfo;
     }
 
-    /** @return 何か実行すべき処理があればtrue. */
-    @Override
-    public boolean shouldRun() {
-        return getOutputFileSetting().isConvert() || needsDownload();
-    }
-
     /** @return 何かダウンロードするものがあればtrue. */
     @Override
     public boolean needsDownload() {
     /** @return 何かダウンロードするものがあればtrue. */
     @Override
     public boolean needsDownload() {
index a2507cb..dc09bfb 100644 (file)
@@ -15,9 +15,6 @@ public interface Profile {
 
     LoginInfo getLoginInfo();
 
 
     LoginInfo getLoginInfo();
 
-    /** @return 何か実行すべき処理があればtrue. */
-    boolean shouldRun();
-
     /** @return 何かダウンロードするものがあればtrue. */
     boolean needsDownload();
 
     /** @return 何かダウンロードするものがあればtrue. */
     boolean needsDownload();