public class JavaVersion extends Object implements Comparable<JavaVersion>
| Modifier and Type | Field and Description |
|---|---|
static JavaVersion |
JAVA_SPECIFICATION_VERSION
Represents the System property
java.specification.version |
static JavaVersion |
JAVA_VERSION
Represents the System property
java.version |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(JavaVersion other) |
boolean |
isAtLeast(JavaVersion other)
Verify if this version is at least some other version
|
boolean |
isAtLeast(String other)
Verify if this version is at least some other version
|
boolean |
isBefore(JavaVersion other)
Verify if this version is before some other version
|
boolean |
isBefore(String other)
Verify if this version is before some other version
|
static JavaVersion |
parse(String s)
Lazy parse the version-scheme.
|
String |
toString() |
public static final JavaVersion JAVA_SPECIFICATION_VERSION
java.specification.versionpublic static final JavaVersion JAVA_VERSION
java.versionpublic static JavaVersion parse(String s)
compareTo(JavaVersion)s - the version stringpublic int compareTo(JavaVersion other)
compareTo in interface Comparable<JavaVersion>public boolean isBefore(JavaVersion other)
other - the version to compare withtrue is this is less than other, otherwise falsepublic boolean isBefore(String other)
other - the version to compare withtrue is this is less than other, otherwise falsepublic boolean isAtLeast(JavaVersion other)
other - the version to compare withtrue is this is greater than or equal to other, otherwise falsepublic boolean isAtLeast(String other)
other - the version to compare withtrue is this is greater than or equal to other, otherwise falseCopyright © 2001–2018 Codehaus Plexus. All rights reserved.