Return the specified value from the string.

@param str string to parse; assume it is either a single value or a range (delimited by "-")
@param getMaximumValue if true return the maximum value
@return specified value from the string
497196
private static int getValue(String str, boolean getMaximumValue) {
    int multiplier = 1;
    String upperOrLowerValue = null;

    final String[] rangeUnit = splitRangeUnit(str);

    if(rangeUnit.length == 2) {
      multiplier = getMultiplier(rangeUnit[1]);
    }

    String[] range = splitRange(rangeUnit[0]);
    upperOrLowerValue = range[0];

    if(range.length == 2) {
      if(getMaximumValue) {
        upperOrLowerValue = range[1];
      }
    }
    return (int) (convertStringToDouble(upperOrLowerValue) * multiplier);
  }
674287
@Override
    public V getBest(String s, int offset, int length) {
        return getBest(0, s, offset, length);
    }
257815
public String getString() 
    {
        String string = Constants.BLANK;
        NumberField numberField = (NumberField)this.getField();
        if (this.getNextConverter().getLength() != 0)
        {
            double dValue = this.getValue();
            if (dValue != 0)
                dValue = 1 / dValue;
            if (m_mfRecip == null)
                m_mfRecip = NumberFormat.getInstance();
            m_mfRecip.setMinimumFractionDigits(numberField.getScale());
            m_mfRecip.setMaximumFractionDigits(numberField.getScale());
            string = m_mfRecip.format(dValue);
        }
        return string;
    }
683906
public double getMax() {
        double max = s.minValue();
        for (int c = 0; c < this.values.length; c++) {
            if (s.gte(values[c], max)) {
                max = values[c];
            }
        }
        return max;
    }
1325608
private function max($value, $max)
    {
        if (is_string($value)) {
            $value = strlen($value);
        }

        return $value <= $max;
    }
1098029
public Integer getMaxAge()
   {
      if (childNode.getTextValueForPatternName("max-age") != null && !childNode.getTextValueForPatternName("max-age").equals("null")) {
         return Integer.valueOf(childNode.getTextValueForPatternName("max-age"));
      }
      return null;
   }
305611
function(str) {
           var reg, value = null;
           if(typeof str === 'string' && str.length) {
               reg = new RegExp('\\s*'+$.trim(this.options.separator)+'\\s*');
               value = str.split(reg);
           } else if($.isArray(str)) {
               value = str; 
           } else {
               value = [str];
           }
           return value;
        }
95123
def _get_str_range(self, vals_stats):
        """"""
        minmax = vals_stats[1] # stats minmax
        minval = self.fmtstr.format(minmax[0])
        maxval = self.fmtstr.format(minmax[1])
        return '{A} to {B:6>}'.format(A=minval, B=maxval)
1041862
public LongParameter setMaximumValue(long maximumValue) {
		if (hasMinimumValue) {
			Util.checkParameter(maximumValue >= minimumValue,
				"Maximum value (" + maximumValue + ") must be greater than or equal to minimum (" + minimumValue + ")");
		}

		this.hasMaximumValue = true;
		this.maximumValue = maximumValue;

		return this;
	}
1329540
public static String nextString(int min, int max) {
		StringBuilder result = new StringBuilder();

		int length = RandomInteger.nextInteger(min, max);
		for (int i = 0; i < length; i++) {
			int index = RandomInteger.nextInteger(_chars.length());
			result.append(_chars.charAt(index));
		}

		return result.toString();
	}
281069
public static float parseFloat(final String str, final float def) {
        final Float result = parseFloat(str);
        if (result == null) {
            return def;
        } else {
            return result.floatValue();
        }
    }
912628
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);
            }
            
        };
    }
1155535
private int parseDMax(String dMaxString) {
		int dMax;
		try {
			dMax = Integer.parseInt(dMaxString);
		} catch (NumberFormatException e) {
			dMax = 0;
		}
		return dMax;
	}
408005
def length_range(string, minimum, maximum):
    
    int_range(len(string), minimum, maximum)
    return string
1325803
private String parseMaxAgeMplus(String value, long lastModified) {
        long currentTimeMillis = System.currentTimeMillis();
        return Long.toString(Long.parseLong(value) + (lastModified - currentTimeMillis) / 1000);
    }
797627
public static char searchMax(char[] charArray) {
        if(charArray.length == 0) {
            throw new IllegalArgumentException("The array you provided does not have any elements");
        }

        char max = charArray[0];

        for(int i = 1; i < charArray.length; i++) {
            if(charArray[i] > max) {
                max = charArray[i];
            }
        }

        return max;
    }
380077
public java.lang.String getValue() {
    java.lang.Object ref = value_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      if (bs.isValidUtf8()) {
        value_ = s;
      }
      return s;
    }
  }