All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.dropwizard.jersey.params.IntParam Maven / Gradle / Ivy

package io.dropwizard.jersey.params;

/**
 * A parameter encapsulating integer values. All non-decimal values will return a
 * {@code 400 Bad Request} response.
 */
public class IntParam extends AbstractParam {
    public IntParam(String input) {
        super(input);
    }

    @Override
    protected String errorMessage(Exception e) {
        return "Parameter is not a number.";
    }

    @Override
    protected Integer parse(String input) {
        return Integer.valueOf(input);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy