Gets a parameter whose value is a (possibly empty) list of integers.
422184
public List<Integer> getIntegerList(final String param) {
    return getList(param, new StringToInteger(),
        new AlwaysValid<Integer>(), "integer");
  }
1148589
@VisibleForTesting
    int getValueFromList(final List<Integer> values, int index, final AtomicInteger shift) {
        Preconditions.checkNotNullNorEmpty(values, "List must not be empty");
        if (index < 0) {
            index = index + values.size();
            shift.incrementAndGet();
            return getValueFromList(values, index, shift);
        }
        if (index >= values.size()) {
            index = index - values.size();
            shift.incrementAndGet();
            return getValueFromList(values, index, shift);
        }
        return values.get(index);
    }
809912
public static List<Integer> asList(int[] a) {
    List<Integer> result = new ArrayList<Integer>(a.length);
    for (int i = 0; i < a.length; i++) {
      result.add(Integer.valueOf(a[i]));
    }
    return result;
  }
803732
def _optional_list(value):
    ''''''
    if isinstance(value, str):
        return (value, )
    elif isinstance(value, list):
        return tuple(value)

    return None
1043819
def get_param_arg(param, idx, klass, arg, attr='id'):
    """"""
    if isinstance(arg, klass):
        return getattr(arg, attr)
    elif isinstance(arg, (int, str)):
        return arg
    else:
        raise TypeError(
            "%s[%d] must be int, str, or %s, not %s" % (
                param, idx, klass.__name__, type(arg).__name__))
1151785
public List<Integer> getIntegers(String name, String delimiter) {
        List<String> strings = getStrings(name, delimiter);

        List<Integer> ints = new ArrayList<>(strings.size());
        for (String value : strings) {
            try {
                int i = Integer.parseInt(value);
                ints.add(i);
            } catch (NumberFormatException e) {
            }
        }

        return Collections.unmodifiableList(ints);
    }
876689
def get_args(request_args, allowed_int_args=[], allowed_str_args=[]):
    """"""
    args = {}

    for allowed_int_arg in allowed_int_args:
        int_value = request_args.get(allowed_int_arg, default=None, type=None)
        if int_value:
            args[allowed_int_arg] = int(int_value)

    for allowed_str_arg in allowed_str_args:
        str_value = request_args.get(allowed_str_arg, default=None, type=None)
        if str_value:
            args[allowed_str_arg] = str_value

    return args
816882
private Integer parseIntegerFromParam(final String value, final int defaultValue) {
        try {
            return Integer.valueOf(value);
        } catch (NumberFormatException | NullPointerException e) {
            return defaultValue;
        }
    }
908018
def toListInt(value):
        
        if TypeConverters._can_convert_to_list(value):
            value = TypeConverters.toList(value)
            if all(map(lambda v: TypeConverters._is_integer(v), value)):
                return [int(v) for v in value]
        raise TypeError("Could not convert %s to list of ints" % value)
628543
def integers(value):
    
    if '.' in value:
        raise ValueError('There are decimal points in %s' % value)
    values = value.replace(',', ' ').split()
    if not values:
        raise ValueError('Not a list of integers: %r' % value)
    try:
        ints = [int(float(v)) for v in values]
    except Exception:
        raise ValueError('Not a list of integers: %r' % value)
    return ints
1250111
private static Integer integerValueOf(String value) {
		try {
			return Integer.valueOf(value);
		} catch (NumberFormatException e) {
			throw new CannotParseException(40, value);
		}
	}
58476
private static Object[] getInitParameters(Class<?>[] parameterTypes) {
        int length = parameterTypes.length;
        Object[] result = new Object[length];
        for (int i = 0; i < length; i++) {
            if (parameterTypes[i].isPrimitive()) {
                Object init = ClassUtil.getPrimitiveDefaultValue(parameterTypes[i]);
                result[i] = init;
                continue;
            }
            result[i] = null;
        }
        return result;
    }
1144202
def is_valid_int(value):
        """"""
        if 0 <= value <= Parameter.MAX:  # This includes ON and OFF
            return True
        if value == Parameter.UNKNOWN_VALUE:
            return True
        if value == Parameter.CURRENT_POSITION:
            return True
        return False
294903
public static final Integer getInteger(String value)
   {
      Integer result;

      try
      {
         result = Integer.valueOf(Integer.parseInt(value));
      }

      catch (Exception ex)
      {
         result = null;
      }

      return (result);
   }
147260
def params(self):
        
        paramlist = [b.params for b in self.bases if b.params.has_value]

        if len(paramlist) == 0:
            return Parameter()
        else:
            return paramlist if len(paramlist) > 1 else paramlist[0]
154328
public List/*< String >*/ getParameters( String name )
    {
        if ( _parameters == null || !_parameters.hasParameters())
            return Collections.EMPTY_LIST;
        else {

            List parameters = _parameters.getParameterValues(name);
            if(parameters == null)
                return Collections.EMPTY_LIST;
            else return Collections.unmodifiableList(parameters);
        }
    }
1354552
public static Function<Object,Integer> i(final String methodName, final Object... optionalParameters) {
        return methodForInteger(methodName, optionalParameters);
    }