|
@@ -133,13 +133,7 @@ public class ItemParser {
|
133
|
133
|
Object keyValue = mapEntry.getKey();
|
134
|
134
|
//getValue method returns corresponding key's value
|
135
|
135
|
Object value = mapEntry.getValue();
|
136
|
|
- String time;
|
137
|
|
- if(value.equals(1)){
|
138
|
|
- time = " time";
|
139
|
|
- }
|
140
|
|
- else{
|
141
|
|
- time = " times";
|
142
|
|
- }
|
|
136
|
+ String time = (1 < (Integer)value) ? " times": " time";
|
143
|
137
|
sb.append("Price: " + keyValue + "\t\t seen: " + value + time + "\n");
|
144
|
138
|
sb.append("-------------\t\t -------------\n");
|
145
|
139
|
}
|