Package com.pdftools.geometry.units
Enum Length.Units
- All Implemented Interfaces:
Serializable,Comparable<Length.Units>
- Enclosing class:
Length
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe centimetre, symbol cm, equal to0.01m.The inch, symbol in, equal to25.4mmor72pt.The kilometre, symbol km, equal to1000m.The metre, symbol m, is the SI unit of length.The millimetre, symbol mm, equal to0.001m.The point, symbol pt, is the default unit used in PDF documents, equal to1/72inor25.4/72mm. -
Method Summary
Modifier and TypeMethodDescriptionstatic Length.UnitsGet the unit enum value from its symbol, e.g.Get the unit's symbol name.toString()static Length.UnitsReturns the enum constant of this type with the specified name.static Length.Units[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
METRE
The metre, symbol m, is the SI unit of length. -
POINT
The point, symbol pt, is the default unit used in PDF documents, equal to1/72inor25.4/72mm. This is the unit used internally by theLengthobject. -
KILOMETRE
The kilometre, symbol km, equal to1000m. -
CENTIMETRE
The centimetre, symbol cm, equal to0.01m. -
MILLIMETRE
The millimetre, symbol mm, equal to0.001m. -
INCH
The inch, symbol in, equal to25.4mmor72pt.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
getSymbol
Get the unit's symbol name. -
toString
- Overrides:
toStringin classEnum<Length.Units>
-
get
Get the unit enum value from its symbol, e.g. m, or in.- Parameters:
symbol- the symbol, e.g. m, or in.- Returns:
-