Пример #1
0
 private Map<Cords1D, BinaryState> generateBinaryStateStruct(int[] data) {
   Map<Cords1D, BinaryState> struct = new HashMap<>();
   for (int x = 0; x < data.length; x++) {
     struct.put(new Cords1D(x), BinaryState.valueOf(data[x]));
   }
   return struct;
 }
Пример #2
0
 private BinaryState[] generateBinaryStateArray(int[] data) {
   BinaryState[] struct = new BinaryState[data.length];
   for (int x = 0; x < data.length; x++) {
     struct[x] = BinaryState.valueOf(data[x]);
   }
   return struct;
 }