code: public static List<boolean[]> split(final boolean[] a, final int size) {
          if (size < 1) {
              throw new IllegalArgumentException("The parameter 'size' can not be zero or less than zero");
          }
  
          if (N.isNullOrEmpty(a)) {
              return new ArrayList<>();
          }
  
          final int len = a.length;
          final List<boolean[]> res = new ArrayList<>(len % size == 0 ? len / size : (len / size) + 1);
  
          for (int from = 0, toIndex = a.length; from < toIndex; from += size) {
              res.add(copyOfRange(a, from, from <= toIndex - size ? from + size : toIndex));
          }
  
          return res;
      }
docs: Returns consecutive sub arrays of an array, each of the same size (the final list may be smaller),
  or an empty List if the specified array is null or empty.
  
  @param a
  @param size
  @return