Package nzilbb.util
Class SemanticVersionComparator
- java.lang.Object
-
- nzilbb.util.SemanticVersionComparator
-
- All Implemented Interfaces:
Comparator<String>
public class SemanticVersionComparator extends Object implements Comparator<String>
Compares semantic version strings.- Author:
- Robert Fromont robert@fromont.net.nz
-
-
Constructor Summary
Constructors Constructor Description SemanticVersionComparator()
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(String version1, String version2)
Compares its two arguments for order.-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
-
-
-
Method Detail
-
compare
public int compare(String version1, String version2)
Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.- Specified by:
compare
in interfaceComparator<String>
-
-