Enum Class DataRateSpec.DataRateUnit

java.lang.Object
java.lang.Enum<DataRateSpec.DataRateUnit>
org.apache.cassandra.config.DataRateSpec.DataRateUnit
All Implemented Interfaces:
Serializable, Comparable<DataRateSpec.DataRateUnit>, Constable
Enclosing class:
DataRateSpec

public static enum DataRateSpec.DataRateUnit extends Enum<DataRateSpec.DataRateUnit>
  • Enum Constant Details

  • Method Details

    • values

      public static DataRateSpec.DataRateUnit[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static DataRateSpec.DataRateUnit valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • fromSymbol

      public static DataRateSpec.DataRateUnit fromSymbol(String symbol)
      Parameters:
      symbol - the unit symbol
      Returns:
      the rate unit corresponding to the given symbol
    • toBytesPerSecond

      public double toBytesPerSecond(double d)
    • toKibibytesPerSecond

      public double toKibibytesPerSecond(double d)
    • toMebibytesPerSecond

      public double toMebibytesPerSecond(double d)
    • toMegabitsPerSecond

      public double toMegabitsPerSecond(double d)
    • convert

      public double convert(double source, DataRateSpec.DataRateUnit sourceUnit)