int[] (List<String> components) { int componentsSize = components.size(); int size = componentsSize != 1 ? componentsSize : 2; int[] array = new int[size]; for (int i = 0; i < componentsSize; i++) { String component = components.get(i); array[i] = tryParseInt(component); } if (componentsSize < size) { array[componentsSize] = 0; } return array; }