Enum Length.Units

java.lang.Object
java.lang.Enum<Length.Units>
com.pdftools.geometry.units.Length.Units
All Implemented Interfaces:
Serializable, Comparable<Length.Units>
Enclosing class:
Length

public static enum Length.Units extends Enum<Length.Units>
  • Enum Constant Details

    • METRE

      public static final Length.Units METRE
      The metre, symbol m, is the SI unit of length.
    • POINT

      public static final Length.Units POINT
      The point, symbol pt, is the default unit used in PDF documents, equal to 1/72in or 25.4/72mm. This is the unit used internally by the Length object.
    • KILOMETRE

      public static final Length.Units KILOMETRE
      The kilometre, symbol km, equal to 1000m.
    • CENTIMETRE

      public static final Length.Units CENTIMETRE
      The centimetre, symbol cm, equal to 0.01m.
    • MILLIMETRE

      public static final Length.Units MILLIMETRE
      The millimetre, symbol mm, equal to 0.001m.
    • INCH

      public static final Length.Units INCH
      The inch, symbol in, equal to 25.4mm or 72pt.
  • Method Details

    • values

      public static Length.Units[] 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 Length.Units 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
    • getSymbol

      public String getSymbol()
      Get the unit's symbol name.
    • toString

      public String toString()
      Overrides:
      toString in class Enum<Length.Units>
    • get

      public static Length.Units get(String symbol)
      Get the unit enum value from its symbol, e.g. m, or in.
      Parameters:
      symbol - the symbol, e.g. m, or in.
      Returns: