Просмотр исходного кода

Deprecate storeMatches and storePercent options

Philipp Bauch 6 лет назад
Родитель
Сommit
cc2d5154fb
1 измененных файлов с 21 добавлено и 12 удалено
  1. 21 12
      jplag/src/main/java/jplag/JPlagOptions.java

+ 21 - 12
jplag/src/main/java/jplag/JPlagOptions.java

@@ -15,6 +15,23 @@ public class JPlagOptions {
    */
   public static final int MAX_RESULT_PAIRS = 1000;
 
+  /**
+   * Deprecated - use similarityThreshold instead!
+   *
+   * Maximum number of comparisons to store per run.
+   */
+  @Deprecated
+  private int storeMatches = 30;
+
+  /**
+   * Deprecated - use similarityThreshold instead!
+   * <p>
+   * True, if `storeMatches` should be interpreted as a percentage threshold for the similarity of a
+   * comparison; false otherwise;
+   */
+  @Deprecated
+  private boolean storePercent = false;
+
   /**
    * TODO: Decide what to do with this.
    * <p>
@@ -46,18 +63,6 @@ public class JPlagOptions {
    */
   private String[] fileSuffixes;
 
-  /**
-   * TODO: Find a better name for this variable.
-   */
-  private int storeMatches = 30;
-
-  /**
-   * TODO: Find a better name for this variable;
-   * <p>
-   * True, if `storeMatches` should be interpreted as a percentage; false otherwise;
-   */
-  private boolean storePercent = false;
-
   /**
    * Percentage value (must be between 0 and 100). Matches with a similarity below this threshold
    * will be ignored. The default value of 0 allows all matches to be stored.
@@ -161,10 +166,12 @@ public class JPlagOptions {
     return fileSuffixes;
   }
 
+  @Deprecated
   public int getStoreMatches() {
     return storeMatches;
   }
 
+  @Deprecated
   public boolean isStorePercent() {
     return storePercent;
   }
@@ -225,10 +232,12 @@ public class JPlagOptions {
     this.fileSuffixes = fileSuffixes;
   }
 
+  @Deprecated
   public void setStoreMatches(int storeMatches) {
     this.storeMatches = storeMatches;
   }
 
+  @Deprecated
   public void setStorePercent(boolean storePercent) {
     this.storePercent = storePercent;
   }