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

tech.aroma.thrift.TimeUnit Maven / Gradle / Ivy

Go to download

Part of the Aroma Project. This project contains the Service and Model Definitions. From this the Server and Client interfaces are generated for the Aroma Service.

There is a newer version: 2.2
Show newest version
/**
 * Autogenerated by Thrift Compiler (0.9.3)
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 *  @generated
 */
package tech.aroma.thrift;


import java.util.Map;
import java.util.HashMap;
import org.apache.thrift.TEnum;

/**
 * Defines the basic Units of Time Measurement.
 */
public enum TimeUnit implements org.apache.thrift.TEnum {
  MILLIS(1),
  SECONDS(2),
  MINUTES(3),
  HOURS(4),
  DAYS(5),
  WEEKS(6);

  private final int value;

  private TimeUnit(int value) {
    this.value = value;
  }

  /**
   * Get the integer value of this enum value, as defined in the Thrift IDL.
   */
  public int getValue() {
    return value;
  }

  /**
   * Find a the enum type by its integer value, as defined in the Thrift IDL.
   * @return null if the value is not found.
   */
  public static TimeUnit findByValue(int value) { 
    switch (value) {
      case 1:
        return MILLIS;
      case 2:
        return SECONDS;
      case 3:
        return MINUTES;
      case 4:
        return HOURS;
      case 5:
        return DAYS;
      case 6:
        return WEEKS;
      default:
        return null;
    }
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy