code: public static boolean isWholeArray(int rank, int... dimension){
          return rank == 0 || dimension == null || dimension.length == 0 ||
                  (dimension.length == 1 && dimension[0] == Integer.MAX_VALUE) || dimension.length == rank;
      }
docs: Returns true if the dimension is null
  or the dimension length is 1 and the first entry
  is {@link Integer#MAX_VALUE}
  @param rank the rank of the input array
  @param dimension the dimensions specified
  
  @return true if the dimension length is equal to the rank,
  the dimension is null or the dimension length is 1 and the first entry is
  {@link Integer#MAX_VALUE}