Interface UnitEnum<T extends Enum<T>>

Type Parameters:
T - The type of unit enum
All Known Implementing Classes:
TimeUnit

public interface UnitEnum<T extends Enum<T>>
Interface for enums that represent a unit
Since:
1.0.0
  • Method Summary

    Modifier and Type
    Method
    Description
    convert(Number number, T unit)
    Converts a number from this unit to the target unit.
  • Method Details

    • convert

      Number convert(Number number, T unit)
      Converts a number from this unit to the target unit.
      Parameters:
      number - The number to convert
      unit - The unit to convert to
      Returns:
      The converted number