Package org.springframework.data.util
Class Version
java.lang.Object
org.springframework.data.util.Version
- All Implemented Interfaces:
- Comparable<Version>
Value object to represent a Version consisting of major, minor and bugfix part.
- Author:
- Oliver Gierke
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionintbooleaninthashCode()booleanReturns whether the currentVersionis the same as the given one.booleanisGreaterThan(Version version) Returns whether the currentVersionis greater (newer) than the given one.booleanisGreaterThanOrEqualTo(Version version) Returns whether the currentVersionis greater (newer) or the same as the given one.booleanisLessThan(Version version) Returns whether the currentVersionis less (older) than the given one.booleanisLessThanOrEqualTo(Version version) Returns whether the currentVersionis less (older) or equal to the current one.static VersionReturns the Java version of the running JVM.static VersionParses the given string representation of a version into aVersionobject.toString()
- 
Constructor Details- 
Versionpublic Version(int... parts) Creates a newVersionfrom the given integer values. At least one value has to be given but a maximum of 4.- Parameters:
- parts- must not be null or empty.
 
 
- 
- 
Method Details- 
parseParses the given string representation of a version into aVersionobject.- Parameters:
- version- must not be null or empty.
- Returns:
 
- 
javaVersionReturns the Java version of the running JVM.- Returns:
- will never be null.
 
- 
isGreaterThanReturns whether the currentVersionis greater (newer) than the given one.- Parameters:
- version-
- Returns:
 
- 
isGreaterThanOrEqualToReturns whether the currentVersionis greater (newer) or the same as the given one.- Parameters:
- version-
- Returns:
 
- 
isReturns whether the currentVersionis the same as the given one.- Parameters:
- version-
- Returns:
 
- 
isLessThanReturns whether the currentVersionis less (older) than the given one.- Parameters:
- version-
- Returns:
 
- 
isLessThanOrEqualToReturns whether the currentVersionis less (older) or equal to the current one.- Parameters:
- version-
- Returns:
 
- 
compareTo- Specified by:
- compareToin interface- Comparable<Version>
 
- 
equals
- 
hashCodepublic int hashCode()
- 
toString
 
-