Enum Unit

java.lang.Object
java.lang.Enum<Unit>
boofcv.generate.Unit
All Implemented Interfaces:
Serializable, Comparable<Unit>, java.lang.constant.Constable

public enum Unit
extends Enum<Unit>
Set of standard units of measure, conversions between them, and their abbreviations
  • Enum Constant Details

    • UNKNOWN

      public static final Unit UNKNOWN
    • MILLIMETER

      public static final Unit MILLIMETER
    • CENTIMETER

      public static final Unit CENTIMETER
    • METER

      public static final Unit METER
    • KILOMETER

      public static final Unit KILOMETER
    • INCH

      public static final Unit INCH
    • YARD

      public static final Unit YARD
    • MILE

      public static final Unit MILE
  • Field Details

    • unitToMeter

      public final double unitToMeter
    • abbreviation

      public final String abbreviation
  • Method Details

    • values

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

      public static Unit valueOf​(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
      NullPointerException - if the argument is null
    • lookup

      public static Unit lookup​(String word)
      Sees if the specified work matches any of the units full name or short name.
    • convert

      public double convert​(double value, Unit to)
    • conversionTo

      public double conversionTo​(Unit to)
    • conversion

      public static double conversion​(Unit from, Unit to)