Class Version
java.lang.Object
org.springframework.data.elasticsearch.support.Version
A version defined by 3 parts: major minor and revision number.
- Since:
- 4.3
- Author:
- Peter-Josef Meisch
-
Constructor Details
-
Version
public Version(int major, int minor, int revision)
-
-
Method Details
-
toString
-
fromString
Creates a version from a String that matchesPATTERN
; major, minor and revision numbers separated by dots with optional trailing characters. A missing revision is treated as 0.- Parameters:
s
- the String to parse- Returns:
- the Version
- Throws:
IllegalArgumentException
- if the input is null or cannot be parsed.
-
getMajor
public int getMajor() -
getMinor
public int getMinor() -
getRevision
public int getRevision()
-