code: public static Range range(final double minValue, final double maxValue) {
          if (minValue > maxValue) {
              throw new IllegalArgumentException("minValue should be less then or equal to maxValue (" + minValue+ ", " + maxValue + ")");
          }
          return new Range() {
  
              @Override
              public Number getMinimum() {
                  return minValue;
              }
  
              @Override
              public Number getMaximum() {
                  return maxValue;
              }
  
              @Override
              public String toString() {
                  return Ranges.toString(this);
              }
              
          };
      }
docs: Range from given min and max.
  
  @param minValue minimum value
  @param maxValue maximum value
  @return the range