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

org.zodiac.netty.http.headers.LocaleHeader Maven / Gradle / Ivy

package org.zodiac.netty.http.headers;

import java.util.Locale;
import java.util.Objects;

class LocaleHeader extends AbstractHeader {

    LocaleHeader(CharSequence name) {
        super(Locale.class, name);
    }

    @Override
    public String toString(Locale value) {
        return Objects.requireNonNull(value, "value").toLanguageTag();
    }

    @Override
    public Locale toValue(CharSequence value) {
        return Locale.forLanguageTag(Objects.requireNonNull(value, "value").toString());
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy