All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.rethinkdb.gen.proto.Version Maven / Gradle / Ivy

There is a newer version: 2.3.2.20160729
Show newest 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();
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy