Convenience factory method to return local numbers based on a given search criteria
@param params the params
@return the list
@throws IOException unexpected error.
769632
public static List<AvailableNumber> searchLocal(final Map<String, Object>params) throws Exception {
    	return searchLocal(BandwidthClient.getInstance(), params);
    }
1274815
private Map<String, Criteria> getCriterias(Map<String, String[]> params) {
        Map<String, Criteria> result = new HashMap<String, Criteria>();
        for (Map.Entry<String, String[]> param : params.entrySet()) {
            for (Criteria criteria : FILTER_CRITERIAS) {
                if (criteria.getName().equals(param.getKey())) {
                    try {
                        Criteria[] parsedCriterias = criteria.parseValue(param.getValue()[0]);
                        for (Criteria parsedCriteria : parsedCriterias) {
                            result.put(parsedCriteria.getName(), parsedCriteria);
                        }
                    } catch (Exception e) {
                        // Exception happened during paring
                        LOG.log(Level.SEVERE, "Error parsing parameter " + param.getKey(), e);
                    }
                    break;
                }
            }
        }
        return result;
    }
70412
public ImmutableList<Class<?>> getClassObjects(final String param) {
    final ImmutableList.Builder<Class<?>> ret = ImmutableList.builder();
    for (final String className : getStringList(param)) {
      try {
        ret.add(getClassObjectForString(className));
      } catch (ClassNotFoundException e) {
        throw new ParameterConversionException(fullString(param), className, e, "class");
      }
    }
    return ret.build();
  }
420328
List<Integer> getParaSents(Integer para) {
	List<Integer> sentList = new ArrayList<Integer>(this.paraSentIndex.get(para));
	Collections.sort(sentList);
	return sentList;
    }
982633
public static String get(String url, String params) throws IOException {
        return HttpUtil.get(url, null, params);
    }
140052
public static Map<String, String> getUrlParams(String param) {
        Map<String, String> map = new HashMap<String, String>();
        if (StringUtils.isEmpty(param)) {
            return map;
        }
        String[] params = param.split("&");
        for (int i = 0; i < params.length; i++) {
            String[] p = params[i].split("=");
            if (p.length == 2) {
                map.put(p[0], p[1]);
            }
        }
        return map;
    }
448694
@SafeVarargs
    public final RequestBuilder params(Map.Entry<String, ?>... params) {
        this.params = Lists.of(params);
        return this;
    }
1074439
public static String formatParamList(String ... params) {
		StringBuilder s = new StringBuilder();
		for(String p : params) {
			if (s.length() != 0) {
				s.append(", ");
			}
			s.append(p);
		}
		return s.toString();
	}
1064751
protected final List<T> findByQuery(String query, Object... params) {
        return this.dataAccess.findByQuery(query, params);
    }
422184
public List<Integer> getIntegerList(final String param) {
    return getList(param, new StringToInteger(),
        new AlwaysValid<Integer>(), "integer");
  }
731671
public List<T> all(Map<String, ?> params) throws AuthenticationException, ApiException, InvalidRequestException {
		return all(params, getAuthenticatedClient());
	}
1368219
public static List<String> queryParams(String param, ContainerRequestContext ctx) {
		return ctx.getUriInfo().getQueryParameters().get(param);
	}
1289135
public function listLocal($params)
    {
        $data = Ensure::Input($params);
        if (!($data->has("size")))
            $data->add("size", DEFAULTS::SIZE);
        if (!($data->has("page")))
            $data->add("page", DEFAULTS::PAGE);
        $url = URIResource::Make($this->availablePath, array("local"));
        $data = $this->client->get($url, $data->get(), true, false);
        return new PhoneNumbersCollection(new DataPacketCollection($data));
    }
45201
@NotNull
    private String getFQName(@NotNull final String localName, Object... params) {
        final StringBuilder builder = new StringBuilder();
        builder.append(storeName);
        builder.append('.');
        builder.append(localName);
        for (final Object param : params) {
            builder.append('#');
            builder.append(param);
        }
        //noinspection ConstantConditions
        return StringInterner.intern(builder.toString());
    }
966243
protected static Map<String, String> getParameters(String list, Map<String, String> params) throws ParseException {
        HeaderTokenizer tokenizer = new HeaderTokenizer(list);
        while (true) {
            Token token = tokenizer.next();
            switch (token.getType()) {
                case Token.EOF:
                    // the EOF token terminates parsing.
                    return params;

                case ';':
                    // each new parameter is separated by a semicolon, including
                    // the first, which separates
                    // the parameters from the main part of the header.
                    // the next token needs to be a parameter name
                    token = tokenizer.next();
                    // allow a trailing semicolon on the parameters.
                    if (token.getType() == Token.EOF) {
                        return params;
                    }

                    if (token.getType() != Token.ATOM) {
                        throw new ParseException("Invalid parameter name: " + token.getValue());
                    }

                    // get the parameter name as a lower case version for better
                    // mapping.
                    String name = token.getValue().toLowerCase(Locale.ENGLISH);

                    token = tokenizer.next();

                    // parameters are name=value, so we must have the "=" here.
                    if (token.getType() != '=') {
                        throw new ParseException("Missing '='");
                    }

                    // now the value, which may be an atom or a literal
                    token = tokenizer.next();

                    if (token.getType() != Token.ATOM && token.getType() != Token.QUOTEDSTRING) {
                        throw new ParseException("Invalid parameter value: " + token.getValue());
                    }

                    String value = token.getValue();

                    // we might have to do some additional decoding. A name that
                    // ends with "*" is marked as being encoded, so if requested, we
                    // decode the value.
                    if (name.endsWith("*")) {
                        name = name.substring(0, name.length() - 1);
                        value = decodeRFC2231value(value);
                    }
                    params.put(name, value);
                    break;
                default:
                    throw new ParseException("Missing ';'");
            }
        }
    }
946193
public String getStringOf(final String param, final List<String> possibleValues) {
    checkNotNull(possibleValues);
    checkArgument(!possibleValues.isEmpty());

    final String value = getString(param);

    if (possibleValues.contains(value)) {
      return value;
    } else {
      throw new InvalidEnumeratedPropertyException(fullString(param), value, possibleValues);
    }
  }
617034
public JSONObject getReasons(HashMap<String, String> params) throws JSONException {
        return oClient.get("/profiles/v1/metadata/reasons", params);
    }