code: public static boolean increment(int[] array, int position, int[] min, int[] max) {
          if (array.length == 0 || position < 0) {
              return false;
          }
  
          boolean incremented = true;
          if (array[position] < max[position]) {
              ++array[position];
          } else {
              incremented = !(position == 0);
              array[position] = min[position];
              --position;
              if (position >= 0) {
                  incremented = increment(array, position, min, max);
              }
          }
          return incremented;
      }
docs: Increments `x` by the unit at the given position, treating the entire
  vector as a number. For example, incrementing
  
  `x_0=\{0,0,0\}` within boundaries `[0,1]` at the second position
  results in: `x_1=\{0,1,0\}`, `x_2=\{1,0,0\}`,
  `x_3=\{1,1,0\}`, `x_4=\{0,0,0\}`.
  @param array is the vector to increment
  @param position is the position of the vector to increment, where smaller
  values lead to higher significance digits
  @param min is the minimum value of the dimension
  @param max is the maximum value of the dimension
  @return `true` if `x` was incremented, `false` otherwise (e.g.,
  incrementing `x_3` returns `false`). In earlier versions to 6.0, the
  result was the inverse and indicated whether the counter had overflown
  (most sincere apologies for this change).