code: public static boolean isClosed(final Range<?> range) {
      return range.hasUpperBound() && BoundType.CLOSED.equals(range.upperBoundType())
          && range.hasLowerBound() && BoundType.CLOSED.equals(range.lowerBoundType());
    }
docs: Returns true iff {@code range} is bounded and closed on both sides.  {@code range}
  may not be null.