com.yammer.dropwizard.jersey.params.LongParam Maven / Gradle / Ivy
package com.yammer.dropwizard.jersey.params;
/**
* A parameter encapsulating long values. All non-decimal values will return a {@code 400 Bad
* Request} response.
*/
public class LongParam extends AbstractParam {
public LongParam(String input) {
super(input);
}
@Override
protected String errorMessage(String input, Exception e) {
return '"' + input + "\" is not a number.";
}
@Override
protected Long parse(String input) {
return Long.valueOf(input);
}
}