Parses the parameter string to fetch the window size
<p>
Package private for UTs
@param param The string to parse
@return The window size (number of points or a unit of time in ms)
481477
long parseParam(final String param) {
    if (param == null || param.isEmpty()) {
      throw new IllegalArgumentException(
          "Window parameter may not be null or empty");
    }
    final char[] chars = param.toCharArray();
    int idx = 0;
    for (int c = 1; c < chars.length; c++) {
      if (Character.isDigit(chars[c])) {
        idx++;
      } else {
        break;
      }
    }
    if (idx < 1) {
      throw new IllegalArgumentException("Invalid moving window parameter: " 
          + param);
    }

    try {
      final int time = Integer.parseInt(param.substring(1, idx + 1));
      final String unit = param.substring(idx + 1, param.length() - 1);
  
      // TODO(CL) - add a Graphite unit parser to DateTime for this kind of conversion
      if ("day".equals(unit) || "d".equals(unit)) {
        return TimeUnit.MILLISECONDS.convert(time, TimeUnit.DAYS);
      } else if ("hr".equals(unit) || "hour".equals(unit) || "h".equals(unit)) {
        return TimeUnit.MILLISECONDS.convert(time, TimeUnit.HOURS);
      } else if ("min".equals(unit) || "m".equals(unit)) {
        return TimeUnit.MILLISECONDS.convert(time, TimeUnit.MINUTES); 
      } else if ("sec".equals(unit) || "s".equals(unit)) {
        return TimeUnit.MILLISECONDS.convert(time, TimeUnit.SECONDS);
      } else {
        throw new IllegalArgumentException("Unknown time unit=" + unit 
            + " in window=" + param);
      }
    } catch (NumberFormatException nfe) {
      throw new IllegalArgumentException("Unable to parse moving window "
          + "parameter: " + param, nfe);
    }
  }
690733
public static Integer getS3StreamBufferSize() {
        String s =
            System.getProperty(SDKGlobalConfiguration.DEFAULT_S3_STREAM_BUFFER_SIZE);
        if (s == null)
            return null;
        try {
            return Integer.valueOf(s);
        } catch (Exception e) {
            log.warn("Unable to parse buffer size override from value: " + s);
        }
        return null;
    }
179184
protected void parseParams(Map<String, String> params) {
        generateAlgorithm = indexOf(PARAM_ALGORITHM, DEFAULT_ALGORITHM, SUPPORTED_ALGORITHMS, params.get(PARAM_ALGORITHM));
        generateIterations = parseInt(PARAM_ITERATIONS, params.get(PARAM_ITERATIONS), DEFAULT_ITERATIONS, MINIMUM_ITERATIONS);
        generateSaltSize = parseInt(PARAM_SALTSIZE, params.get(PARAM_SALTSIZE), DEFAULT_SALTSIZE, MINIMUM_SALTSIZE);
        generateKeySize = parseInt(PARAM_KEYSIZE, params.get(PARAM_KEYSIZE), DEFAULT_KEYSIZE, MINIMUM_KEYSIZE);
    }
941357
@SuppressWarnings("rawtypes")
    protected String parseStringParameter(Map params, String paramName) {
        Object paramModel = params.get(paramName);
        if (paramModel == null) {
            return null;
        }
        if (!(paramModel instanceof SimpleScalar)) {
            throw new IllegalArgumentException(paramName + " must be string");
        }
        return ((SimpleScalar)paramModel).getAsString();
    }
1251784
private void parseMsgSize(Map<Object, Object> props) {
        String value = (String) props.get(HttpConfigConstants.PROPNAME_MSG_SIZE_LIMIT);
        if (null != value) {
            try {
                this.msgSizeLimit = Long.parseLong(value);
                if (HttpConfigConstants.UNLIMITED > getMessageSize()) {
                    if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
                        Tr.event(tc, "Config: Invalid size, setting to unlimited: " + this.msgSizeLimit);
                    }
                    this.msgSizeLimit = HttpConfigConstants.UNLIMITED;
                }
            } catch (NumberFormatException e) {
                // no FFDC required
                if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
                    Tr.event(tc, "Config: Invalid maximum message size; " + value);
                }
            }
        }
    }
860456
public String getParam(String param) {
        int i = findParam(param);
        return i < 0 ? null : StrUtil.piece(extraInfo[i], "=", 2);
    }
1020613
private static ParameterFiller parseParameter(String parameter) {
    String wrappedParameter = "{" + parameter + "}";
    String trimmedParameter = parameter.trim();
    ParameterFiller parameterFiller = parseDateParameter(wrappedParameter, trimmedParameter);
    if (parameterFiller != null) {
      return parameterFiller;
    }

    parameterFiller = parseLevelParameter(wrappedParameter, trimmedParameter);
    if (parameterFiller != null) {
      return parameterFiller;
    }

    parameterFiller = parseTagParameter(wrappedParameter, trimmedParameter);
    if (parameterFiller != null) {
      return parameterFiller;
    }

    parameterFiller = parseMessageParameter(wrappedParameter, trimmedParameter);
    if (parameterFiller != null) {
      return parameterFiller;
    }

    return null;
  }
19595
public String getScaleParam() {

        if (!isScaled() && !isCropped()) {
            // the image is not cropped nor scaled, return an empty parameter
            return "";
        }
        StringBuffer result = new StringBuffer();
        if ((m_targetHeight > -1) || (m_targetWidth > -1)) {
            result.append(SCALE_PARAM_TARGETHEIGHT).append(SCALE_PARAM_COLON).append(getResultingTargetHeight()).append(
                SCALE_PARAM_DELIMITER);
            result.append(SCALE_PARAM_TARGETWIDTH).append(SCALE_PARAM_COLON).append(getResultingTargetWidth()).append(
                SCALE_PARAM_DELIMITER);
        }
        if (m_cropX > -1) {
            result.append(SCALE_PARAM_CROP_X).append(SCALE_PARAM_COLON).append(m_cropX).append(SCALE_PARAM_DELIMITER);
        }
        if (m_cropY > -1) {
            result.append(SCALE_PARAM_CROP_Y).append(SCALE_PARAM_COLON).append(m_cropY).append(SCALE_PARAM_DELIMITER);
        }
        if (m_cropHeight > -1) {
            result.append(SCALE_PARAM_CROP_HEIGHT).append(SCALE_PARAM_COLON).append(m_cropHeight).append(
                SCALE_PARAM_DELIMITER);
        }
        if (m_cropWidth > -1) {
            result.append(SCALE_PARAM_CROP_WIDTH).append(SCALE_PARAM_COLON).append(m_cropWidth).append(
                SCALE_PARAM_DELIMITER);
        }
        if (result.length() > 0) {
            result.deleteCharAt(result.length() - 1);
        }
        return result.toString();
    }
1037132
public static long getLong(@NotNull ServletRequest request, @NotNull String param) {
    return getLong(request, param, 0L);
  }
37843
public ValueNumber getEntryValueForParameter(int param) {

        SignatureParser sigParser = new SignatureParser(methodGen.getSignature());
        int p = 0;
        int slotOffset =  methodGen.isStatic() ? 0 : 1;

        for ( String paramSig : sigParser.parameterSignatures()) {
            if (p == param) {
                return getEntryValue(slotOffset);
            }
            p++;
            slotOffset += SignatureParser.getNumSlotsForType(paramSig);
        }

        throw new IllegalStateException();
    }
1236452
@Override
    public String parameters() {
        StringBuilder result = new StringBuilder();
        Iterator<Pair> it = xy.iterator();
        while (it.hasNext()) {
            Pair pair = it.next();
            result.append(String.format("%s %s",
                    Op.str(pair.getX()), Op.str(pair.getY())));
            if (it.hasNext()) {
                result.append(" ");
            }
        }
        if (!Op.isEq(height, 1.0)) {
            result.append(String.format(" %s", Op.str(height)));
        }
        return result.toString();
    }
22025
public static String getFormat(TypeDeclaration param) {
		if (param == null) {
			return null;
		}
		if (param instanceof NumberTypeDeclaration) {
			return ((NumberTypeDeclaration) param).format();
		}
		if (param instanceof DateTimeTypeDeclaration) {
			return ((DateTimeTypeDeclaration) param).format();
		}

		return null;
	}
981209
private static void parseParam(final String param, 
                                 final List<String> metric_queries,
                                 final ExpressionTree root, 
                                 final TSQuery data_query, 
                                 final int index) {
    if (param == null || param.length() == 0) {
      throw new IllegalArgumentException("Parameter cannot be null or empty");
    }

    if (param.indexOf('(') > 0 && param.indexOf(')') > 0) {
      // sub expression
      final ExpressionTree sub_tree = parse(param, metric_queries, data_query);
      root.addSubExpression(sub_tree, index);
    } else if (param.indexOf(':') >= 0) {
      // metric query
      metric_queries.add(param);
      root.addSubMetricQuery(param, metric_queries.size() - 1, index);
    } else {
      // expression parameter
      root.addFunctionParameter(param);
    }
  }
230015
@Override
    public long numParams() {
        int ret = 0;
        for (INDArray val : params.values())
            ret += val.length();
        return ret;
    }
658862
public String getString(final String param) {
    checkNotNull(param);
    checkArgument(!param.isEmpty());

    final String ret = params.get(param);
    observeWithListeners(param);

    if (ret != null) {
      return ret;
    } else {
      throw new MissingRequiredParameter(fullString(param));
    }
  }
1281272
@SuppressWarnings("unchecked")
	@Override
	public T clobParam(final String paramName, final Reader value, final int len) {
		context().clobParam(paramName, value, len);
		return (T) this;
	}
340544
@Override
	public Parameter getParam(final String paramName) {
		Parameter param = getBindParameter(paramName);
		if (param == null) {
			Map<String, Parameter> constParams = getConstParameterMap();
			if (constParams != null) {
				param = constParams.get(paramName.toUpperCase());
			}
		}
		return param;
	}