106107108109110111112113114
for (String s : current.split(",")) { if (!s.contains(":")) { s += ":0"; } String[] parts = s.split(":"); items.add(new ItemData(Integer.parseInt(parts[0]), Short.parseShort(parts[1]))); } return items; }