Enum Class 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
    • MICROMETER

      public static final Unit MICROMETER
      A.k.a. Micron
    • MILLIMETER

      public static final Unit MILLIMETER
    • CENTIMETER

      public static final Unit CENTIMETER
    • METER

      public static final Unit METER
    • KILOMETER

      public static final Unit KILOMETER
    • MIL

      public static final Unit MIL
      0.001 inch a.k.a. thou
    • 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 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 Unit 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
    • valuesKnown

      public Unit[] valuesKnown()
      Returns value of all units which are not "UNKNOWN"
    • 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)