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

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

package org.zodiac.netty.http.headers;

import java.util.Objects;

import org.zodiac.sdk.toolkit.util.lang.NumUtil;

class IntHeader extends AbstractHeader {

    IntHeader(CharSequence name) {
        super(Integer.TYPE, name);
    }

    @Override
    public CharSequence toCharSequence(Integer value) {
        return Objects.requireNonNull(value, "value").toString();
    }

    @Override
    public Integer toValue(CharSequence value) {
        return NumUtil.parseInt(Objects.requireNonNull(value, "value"));
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy