public Version(final String version) {
        this.original = version;

        if (version == null) {
            this.major = null;
            this.minor = null;
            this.revision = null;
            this.type = null;
            this.build = null;
            return;
        }

        final Matcher m = Pattern.compile("(\\d+)\\.(\\d+).(\\d+)(a|b|rc|$)(\\d+)?").matcher(this.original);
        if (!m.find())
            throw new IllegalArgumentException("Unrecognized version format \"" + version + "\"; Expected <Major>.<Minor>.<Revision>[<Type><Build>]");

        this.major = Integer.parseInt(m.group(1));
        this.minor = Integer.parseInt(m.group(2));
        this.revision = Integer.parseInt(m.group(3));
        this.type = Type.parse(m.group(4));
        this.build = (m.group(5) != null ? Integer.parseInt(m.group(5)) : null);
    }