Class SemanticVersionParser.SemanticVersionParserBuilder
java.lang.Object
com.norconex.commons.lang.version.SemanticVersionParser.SemanticVersionParserBuilder
- Enclosing class:
SemanticVersionParser
-
Method Summary
Modifier and TypeMethodDescriptionbuild()ignoreLeadingCharacters(boolean ignoreLeadingCharacters) Performs a best attempt to ignore any non-numeric characters before the version.ignoreSuffix(String ignoreSuffix) ignoreSuffixes(Collection<? extends String> ignoreSuffixes) optionalMinorAndPatch(boolean optionalMinorAndPatch) Enables supports for version strings not having the minor or patch segment.optionalPreReleasePrefix(boolean optionalPreReleasePrefix) Enables supports for pre-release prefix separator string to be any number of non alpha-numeric characters, including none (i.e., having the pre-release string next to version).toString()
-
Method Details
-
optionalMinorAndPatch
public SemanticVersionParser.SemanticVersionParserBuilder optionalMinorAndPatch(boolean optionalMinorAndPatch) Enables supports for version strings not having the minor or patch segment. They are interpreted as if they were zero. Examples:
1.2is interpreted as1.2.03is interpreted as3.0.0
- Returns:
this.
-
optionalPreReleasePrefix
public SemanticVersionParser.SemanticVersionParserBuilder optionalPreReleasePrefix(boolean optionalPreReleasePrefix) Enables supports for pre-release prefix separator string to be any number of non alpha-numeric characters, including none (i.e., having the pre-release string next to version). Examples:
1.2.3RC1is interpreted as1.2.3-RC11.2.3_M3is interpreted as1.2.3-M3
- Returns:
this.
-
ignoreLeadingCharacters
public SemanticVersionParser.SemanticVersionParserBuilder ignoreLeadingCharacters(boolean ignoreLeadingCharacters) Performs a best attempt to ignore any non-numeric characters before the version. In the event that more than one valid variation of a version is be detected, the outcome is unpredictable. Examples:
v1.2.3is interpreted as1.2.3some-library-1.2.3is interpreted as1.2.3
- Returns:
this.
-
ignoreSuffix
-
ignoreSuffixes
public SemanticVersionParser.SemanticVersionParserBuilder ignoreSuffixes(Collection<? extends String> ignoreSuffixes) -
clearIgnoreSuffixes
-
build
-
toString
-