public class ComparableVersion
extends java.lang.Object
implements java.lang.Comparable<java.lang.String>
VersionComparator
Modifier and Type | Field and Description |
---|---|
java.lang.String |
version |
Constructor and Description |
---|
ComparableVersion(java.lang.String version) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(java.lang.String target) |
boolean |
isGreaterThanAndNotEqualTo(java.lang.String target) |
boolean |
isGreaterThanOrEqualTo(java.lang.String target) |
boolean |
isInRange(java.lang.String range)
parses a string expressed with common mathematical sematics,
as either square brackets (inclusive), round brackets (exclusive), or one of each,
surrounding a pair of version strings separated by a comma, where a version string
consists of any non-whitespace non-bracket characters
(ie numbers, letters, dots, hyphens, underscores) or is empty (to indicate no bound);
e.g.
|
boolean |
isInRange(java.lang.String lowerBound,
java.lang.String upperBound)
inclusive at endpoints
|
boolean |
isLessThanAndNotEqualTo(java.lang.String target) |
boolean |
isLessThanOrEqualTo(java.lang.String target) |
public int compareTo(java.lang.String target)
compareTo
in interface java.lang.Comparable<java.lang.String>
public boolean isGreaterThanOrEqualTo(java.lang.String target)
public boolean isGreaterThanAndNotEqualTo(java.lang.String target)
public boolean isLessThanOrEqualTo(java.lang.String target)
public boolean isLessThanAndNotEqualTo(java.lang.String target)
public boolean isInRange(java.lang.String lowerBound, java.lang.String upperBound)
public boolean isInRange(java.lang.String range)