Package com.avoka.fc.core.util
Class ComposerReleaseComparator
java.lang.Object
com.avoka.fc.core.util.ComposerReleaseComparator
- All Implemented Interfaces:
Comparator<String>
Provides a comparator for Composer versions
- Since:
- 4.3.0
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The 2.2.0 versionstatic final String
The 3.3.0 versionstatic final String
The 3.3.0sp1 versionstatic final String
The 3.3.0sp2 versionstatic final String
The 3.3.0sp3 versionstatic final String
The 3.3.0sp4 versionstatic final String
The 3.4.0 versionstatic final String
The 3.4.0sp1 versionstatic final String
The 3.4.1 versionstatic final String
The 3.4.1sp1 versionstatic final String
The 3.6.0 versionstatic final String
The 4.0.0 versionstatic final String
The 4.0.0sp1 versionstatic final String
The 4.1.0 versionstatic final String
The 4.1.0sp1 versionstatic final String
The 4.2.0 versionstatic final String
The 4.2.0sp1 versionstatic final String
The 4.3.0 versionstatic final String
The 5.0.0 version -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Compares two release strings.static boolean
Check whether a source version is equal to a target versionstatic boolean
isGreaterThan
(String source, String target) Check whether a source version is greater than a target versionstatic boolean
isGreaterThanOrEqual
(String source, String target) Check whether a source version is greater than or equal to a target versionstatic boolean
isLessThan
(String source, String target) Check whether a source version is less than a target versionstatic boolean
isLessThanOrEqual
(String source, String target) Check whether a source version is less than or equal to a target versionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Field Details
-
RELEASE_220
The 2.2.0 version- See Also:
-
RELEASE_330
The 3.3.0 version- See Also:
-
RELEASE_330SP1
The 3.3.0sp1 version- See Also:
-
RELEASE_330SP2
The 3.3.0sp2 version- See Also:
-
RELEASE_330SP3
The 3.3.0sp3 version- See Also:
-
RELEASE_330SP4
The 3.3.0sp4 version- See Also:
-
RELEASE_340
The 3.4.0 version- See Also:
-
RELEASE_340sp1
The 3.4.0sp1 version- See Also:
-
RELEASE_341
The 3.4.1 version- See Also:
-
RELEASE_341sp1
The 3.4.1sp1 version- See Also:
-
RELEASE_360
The 3.6.0 version- See Also:
-
RELEASE_400
The 4.0.0 version- See Also:
-
RELEASE_400sp1
The 4.0.0sp1 version- See Also:
-
RELEASE_410
The 4.1.0 version- See Also:
-
RELEASE_410sp1
The 4.1.0sp1 version- See Also:
-
RELEASE_420
The 4.2.0 version- See Also:
-
RELEASE_420sp1
The 4.2.0sp1 version- See Also:
-
RELEASE_430
The 4.3.0 version- See Also:
-
RELEASE_500
The 5.0.0 version- See Also:
-
-
Constructor Details
-
ComposerReleaseComparator
public ComposerReleaseComparator()
-
-
Method Details
-
compare
Compares two release strings. Release strings are of the form x.y.zsp# where the various components are optional. eg. Some examples are 3.2, 3.4.0, 4.0.0sp3- Specified by:
compare
in interfaceComparator<String>
- Parameters:
o1
- the first version stringo2
- the second version string- Returns:
- the result of the comparison
-
isLessThan
Check whether a source version is less than a target version- Parameters:
source
- the source versiontarget
- the target version- Returns:
- true if the source version is strictly less than the target version
-
isLessThanOrEqual
Check whether a source version is less than or equal to a target version- Parameters:
source
- the source versiontarget
- the target version- Returns:
- true if the source version is less than or equal to the target version
-
isEqual
Check whether a source version is equal to a target version- Parameters:
source
- the source versiontarget
- the target version- Returns:
- true if the source version is equal to the target version
-
isGreaterThan
Check whether a source version is greater than a target version- Parameters:
source
- the source versiontarget
- the target version- Returns:
- true if the source version is strictly greater than the target version
-
isGreaterThanOrEqual
Check whether a source version is greater than or equal to a target version- Parameters:
source
- the source versiontarget
- the target version- Returns:
- true if the source version is greater than or equal to the target version
-