java.lang.Comparable<JavaVersion>public class JavaVersion extends java.lang.Object implements java.lang.Comparable<JavaVersion>
| Modifier and Type | Field | 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 | Description |
|---|---|---|
int |
compareTo(JavaVersion other) |
|
boolean |
equals(java.lang.Object obj) |
|
int |
hashCode() |
|
boolean |
isAtLeast(java.lang.String other) |
Verify if this version is at least some other version
|
boolean |
isAtLeast(JavaVersion other) |
Verify if this version is at least some other version
|
boolean |
isBefore(java.lang.String other) |
Verify if this version is before some other version
|
boolean |
isBefore(JavaVersion other) |
Verify if this version is before some other version
|
static JavaVersion |
parse(java.lang.String s) |
Lazy parse the version-scheme.
|
java.lang.String |
toString() |
public static final JavaVersion JAVA_SPECIFICATION_VERSION
java.specification.versionpublic static final JavaVersion JAVA_VERSION
java.versionpublic static JavaVersion parse(java.lang.String s)
compareTo(JavaVersion)s - the version stringpublic int compareTo(JavaVersion other)
compareTo in interface java.lang.Comparable<JavaVersion>public boolean isBefore(JavaVersion other)
other - the version to compare withtrue is this is less than other, otherwise falsepublic boolean isBefore(java.lang.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(java.lang.String other)
other - the version to compare withtrue is this is greater than or equal to other, otherwise falsepublic java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object