io.dropwizard.jersey.params.AbstractParam Java Examples
The following examples show how to use
io.dropwizard.jersey.params.AbstractParam.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: BlobStoreResource1.java From emodb with Apache License 2.0 | 4 votes |
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(); }
Example #2
Source File: DataStoreResource1.java From emodb with Apache License 2.0 | 4 votes |
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(); }
Example #3
Source File: DataStoreResource1.java From emodb with Apache License 2.0 | 4 votes |
private <T> T getOptional(AbstractParam<T> param) { return (param != null) ? param.get() : null; }