code: public Stream<IntPair> adjacent4Points(final int i, final int j) {
          final IntPair up = i == 0 ? null : IntPair.of(i - 1, j);
          final IntPair right = j == cols - 1 ? null : IntPair.of(i, j + 1);
          final IntPair down = i == rows - 1 ? null : IntPair.of(i + 1, j);
          final IntPair left = j == 0 ? null : IntPair.of(i, j - 1);
  
          return Stream.of(up, right, down, left);
      }
docs: Returns the four adjacencies with order: up, right, down, left. <code>null</code> is set if the adjacency doesn't exist.
  
  @param i
  @param j
  @return