private <T> T getRequired(AbstractParam<T> value, String name) { if (value == null) { throw new IllegalArgumentException(format("Missing required query parameter: %s", name)); } return value.get(); }
private static <T> T getRequired(AbstractParam<T> param, String name) { if (param == null) { throw new IllegalArgumentException(format("Missing required query parameter: %s", name)); } return param.get(); }
private <T> T getOptional(AbstractParam<T> param) { return (param != null) ? param.get() : null; }