Moved to Java 8. Code cleanup.
[meviz.git] / src / main / java / eu / svjatoslav / meviz / renamer / Main.java
index 6495e0f..073898e 100755 (executable)
@@ -17,16 +17,16 @@ import java.util.Arrays;
 
 public class Main implements Module {
 
-    public int processedFilesCount;
-    CommandlineHandler commandlineHandler = new CommandlineHandler();
-    RenamingOptions options;
+    private final CommandlineHandler commandlineHandler = new CommandlineHandler();
+    private int processedFilesCount;
+    private RenamingOptions options;
 
     /**
      * Verify that program has enough information to start executing
      *
      * @return true if all is ok, false if errors were found
      */
-    public boolean checkThatThereIsEnoughDataToProceed() {
+    private boolean checkThatThereIsEnoughDataToProceed() {
         if (options.inputPatterns.size() == 0) {
             System.out.println("Error: no input patterns given.");
             return false;
@@ -40,7 +40,7 @@ public class Main implements Module {
         return true;
     }
 
-    public boolean fileMatchesInputPattern(final File file) {
+    private boolean fileMatchesInputPattern(final File file) {
         final String fileName = file.getName();
 
         for (final String inputPattern : options.inputPatterns)
@@ -119,7 +119,7 @@ public class Main implements Module {
         }
     }
 
-    public void processFileOrDirectory(final File file) {
+    private void processFileOrDirectory(final File file) {
         if (!file.exists()) {
             System.out.println("Error: file \"" + file.getAbsolutePath()
                     + "\" does not exist.");
@@ -134,7 +134,7 @@ public class Main implements Module {
 
     }
 
-    public void rename() {
+    private void rename() {
         processFileOrDirectory(options.targetDirectory);
     }