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

io.dropwizard.jersey.jsr310.LocalTimeParam Maven / Gradle / Ivy

package io.dropwizard.jersey.jsr310;

import io.dropwizard.jersey.params.AbstractParam;
import org.checkerframework.checker.nullness.qual.Nullable;

import java.time.LocalTime;

/**
 * A parameter encapsulating time values. All non-parsable values will return a {@code 400 Bad
 * Request} response.
 *
 * @see LocalTime
 */
public class LocalTimeParam extends AbstractParam {
    public LocalTimeParam(@Nullable final String input) {
        super(input);
    }

    @Override
    protected LocalTime parse(@Nullable final String input) throws Exception {
        return LocalTime.parse(input);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy