Selaa lähdekoodia

public -> private methods

ghost1497 6 vuotta sitten
vanhempi
commit
925a5c1af4
1 muutettua tiedostoa jossa 3 lisäystä ja 3 poistoa
  1. 3
    3
      src/main/java/io/zipcoder/ItemParser.java

+ 3
- 3
src/main/java/io/zipcoder/ItemParser.java Näytä tiedosto

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