class HttpProtocolVersion implements HttpProtocol {

    public static HttpProtocolVersion of(final int major, final int minor) {
        if (major == 1) {
            if (minor == 1) {
                return HTTP_1_1;
            }
            if (minor == 0) {
                return HTTP_1_0;
            }
        } else if (major == 2 && minor == 0) {
            return HTTP_2_0;
        }
        return new HttpProtocolVersion(major, minor);
    }

    private  HttpProtocolVersion(final int major, final int minor);

}