com.rethinkdb.gen.proto.Version Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of qj-rethinkdb-driver Show documentation
Show all versions of qj-rethinkdb-driver Show documentation
Java driver for RethinkDB (Modified from Official version)
// Autogenerated by metajava.py.
// Do not edit this file directly.
// The template for this file is located at:
// ../../../../../../../../templates/Enum.java
package com.rethinkdb.gen.proto;
import java.util.Optional;
public enum Version {
V0_1(1063369270),
V0_2(1915781601),
V0_3(1601562686),
V0_4(1074539808),
V1_0(885177795);
public final int value;
private Version(int value){
this.value = value;
}
public static Version fromValue(int value) {
switch (value) {
case 1063369270: return Version.V0_1;
case 1915781601: return Version.V0_2;
case 1601562686: return Version.V0_3;
case 1074539808: return Version.V0_4;
case 885177795: return Version.V1_0;
default:
throw new IllegalArgumentException(String.format(
"%s is not a legal value for Version", value));
}
}
public static Optional maybeFromValue(int value) {
try {
return Optional.of(fromValue(value));
} catch (IllegalArgumentException iae) {
return Optional.empty();
}
}
}