static Version parseValidSemVer(String version) {
        VersionParser parser = new VersionParser(version);
        return parser.parseValidSemVer();
    }
static Version parseValidSemVer ( String version ) { VersionParser parser = new VersionParser ( version ) ; return parser . parseValidSemVer ( ) ; }
Parses the whole version including pre-release version and build metadata.

@param version the version string to parse
@return a valid version object
@throws IllegalArgumentException if the input string is {@code NULL} or empty
@throws ParseException when there is a grammar error
@throws UnexpectedCharacterException when encounters an unexpected character type