瀏覽代碼

public -> private methods

ghost1497 6 年之前
父節點
當前提交
925a5c1af4
共有 1 個檔案被更改,包括 3 行新增3 行删除
  1. 3
    3
      src/main/java/io/zipcoder/ItemParser.java

+ 3
- 3
src/main/java/io/zipcoder/ItemParser.java 查看文件

@@ -34,7 +34,7 @@ public class ItemParser {
34 34
         return newItem;
35 35
     }
36 36
 
37
-    public String fixAnyZeros(String s) {
37
+    private String fixAnyZeros(String s) {
38 38
         Pattern pattern = Pattern.compile("[0]");
39 39
         Matcher matcher = pattern.matcher(s);
40 40
         return matcher.replaceAll("o");
@@ -70,7 +70,7 @@ public class ItemParser {
70 70
         return new ArrayList<String>(Arrays.asList(inputString.split(stringPattern)));
71 71
     }
72 72
 
73
-    public void buildItemList() {
73
+    private void buildItemList() {
74 74
         for (String itemDetails : values) {
75 75
             try {
76 76
                 this.itemList.add(parseStringIntoItem(itemDetails));
@@ -150,7 +150,7 @@ public class ItemParser {
150 150
         return itemOcc;
151 151
     }
152 152
 
153
-    public int getPriceOccurrences(Double targetPrice, ArrayList<Double> prices) {
153
+    private int getPriceOccurrences(Double targetPrice, ArrayList<Double> prices) {
154 154
         int priceCount = 0;
155 155
         for (Double price : prices) {
156 156
             if (price == targetPrice) {