Annotation Type UnitsMultiple


  • @Documented
    @Retention(RUNTIME)
    public @interface UnitsMultiple
    Define the relation between a base unit and the current unit.

    TODO: add support for factors and more general formulas? E.g. it would be cool if the relation hour → minute and Fahrenheit → Celsius could be expressed.

    See the Checker Framework Manual:
    Units Checker
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      java.lang.Class<? extends java.lang.annotation.Annotation> quantity
      Returns the base unit to use.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      Prefix prefix
      Returns the scaling prefix.
    • Element Detail

      • quantity

        java.lang.Class<? extends java.lang.annotation.Annotation> quantity
        Returns the base unit to use.
        Returns:
        the base unit to use
      • prefix

        Prefix prefix
        Returns the scaling prefix.
        Returns:
        the scaling prefix
        Default:
        org.checkerframework.checker.units.qual.Prefix.one