Package org.springframework.web.accept
Class SemanticApiVersionParser
java.lang.Object
org.springframework.web.accept.SemanticApiVersionParser
- All Implemented Interfaces:
ApiVersionParser<SemanticApiVersionParser.Version>
public class SemanticApiVersionParser
extends Object
implements ApiVersionParser<SemanticApiVersionParser.Version>
Parser for semantic API versioning with a major, minor, and patch values.
For example "1", "1.0", "1.2", "1.2.0", "1.2.3". Leading, non-integer
characters, as in "v1.0", are skipped.
- Since:
- 7.0
- Author:
- Rossen Stoyanchev
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Representation of a semantic version. -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
SemanticApiVersionParser
public SemanticApiVersionParser()
-
-
Method Details
-
parseVersion
Description copied from interface:ApiVersionParser
Parse the version into an Object.- Specified by:
parseVersion
in interfaceApiVersionParser<SemanticApiVersionParser.Version>
- Parameters:
version
- the value to parse- Returns:
- an Object that represents the version
-