class RedisVersion {

        private static final Pattern DECIMALS = Pattern.compile("(\\d+)");

        private final static RedisVersion UNKNOWN = new RedisVersion("0.0.0");

        private final static RedisVersion UNSTABLE = new RedisVersion("255.255.255");

        private final int major;

        private final int minor;

        private final int bugfix;

        private RedisVersion(String version) {

            int major = 0;
            int minor = 0;
            int bugfix = 0;

            LettuceAssert.notNull(version, "Version must not be null");

            Matcher matcher = DECIMALS.matcher(version);

            if (matcher.find()) {
                major = Integer.parseInt(matcher.group(1));

                if (matcher.find()) {
                    minor = Integer.parseInt(matcher.group(1));
                }

                if (matcher.find()) {
                    bugfix = Integer.parseInt(matcher.group(1));
                }
            }

            this.major = major;
            this.minor = minor;
            this.bugfix = bugfix;
        }

        /**
         * Construct a new {@link RedisVersion} from a version string containing major, minor and bugfix version such as
         * {@code 7.2.0}.
         *
         * @param version
         * @return
         */
        public static RedisVersion of(String version) {
            return new RedisVersion(version);
        }

        public boolean isGreaterThan(RedisVersion version) {
            return this.compareTo(version) > 0;
        }

        public boolean isGreaterThanOrEqualTo(RedisVersion version) {
            return this.compareTo(version) >= 0;
        }

        public boolean is(RedisVersion version) {
            return this.equals(version);
        }

        public boolean isLessThan(RedisVersion version) {
            return this.compareTo(version) < 0;
        }

        public boolean isLessThanOrEqualTo(RedisVersion version) {
            return this.compareTo(version) <= 0;
        }

        public int compareTo(RedisVersion that) {
            if (this.major != that.major) {
                return this.major - that.major;
            } else if (this.minor != that.minor) {
                return this.minor - that.minor;
            } else {
                return this.bugfix - that.bugfix;
            }
        }

        @Override
        public boolean equals(Object o) {<FILL_FUNCTION_BODY>}

        @Override
        public int hashCode() {
            return Objects.hash(major, minor, bugfix);
        }

        @Override
        public String toString() {
            return major + "." + minor + "." + bugfix;
        }

    }

            if (this == o) {
                return true;
            }
            if (o == null || getClass() != o.getClass()) {
                return false;
            }
            RedisVersion that = (RedisVersion) o;
            return major == that.major && minor == that.minor && bugfix == that.bugfix;
        
<no_super_class>