-
- All Implemented Interfaces:
-
java.io.Serializable,java.lang.Comparable
public enum JavaVersionAn enum representing all the versions of the Java specification. This is intended to mirror available values from the java.specification.version System property.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description JAVA_1_8Java 1.8.
JAVA_1_7Java 1.7.
JAVA_1_6Java 1.6.
JAVA_1_5Java 1.5.
JAVA_1_4Java 1.4.
JAVA_1_3Java 1.3.
JAVA_1_2Java 1.2.
JAVA_1_1Java 1.1.
JAVA_0_9The Java version reported by Android. This is not an official Java version number.
-
Method Summary
Modifier and Type Method Description booleanatLeast(JavaVersion requiredVersion)Whether this version of Java is at least the version of Java passed in. StringtoString()The string value is overridden to return the standard name. static Array<JavaVersion>values()static JavaVersionvalueOf(String name)-
-
Method Detail
-
atLeast
boolean atLeast(JavaVersion requiredVersion)
Whether this version of Java is at least the version of Java passed in.
For example:
{@code myVersion.atLeast(JavaVersion.JAVA_1_4)}- Parameters:
requiredVersion- the version to check against, not null
-
toString
String toString()
The string value is overridden to return the standard name.
For example,
"1.5".
-
values
static Array<JavaVersion> values()
-
valueOf
static JavaVersion valueOf(String name)
-
-
-
-