public static enum Length.Units extends java.lang.Enum<Length.Units>
Enum Constant | Description |
---|---|
CENTIMETRE |
The centimetre, symbol cm, equal to
0.01m . |
INCH |
The inch, symbol in, equal to
25.4mm or 72pt . |
KILOMETRE |
The kilometre, symbol km, equal to
1000m . |
METRE |
The metre, symbol m, is the SI unit of length.
|
MILLIMETRE |
The millimetre, symbol mm, equal to
0.001m . |
POINT |
The point, symbol pt, is the default unit used in PDF documents, equal to
1/72in or 25.4/72mm . |
Modifier and Type | Method | Description |
---|---|---|
static Length.Units |
get(java.lang.String symbol) |
Get the unit enum value from its symbol, e.g.
|
java.lang.String |
getSymbol() |
Get the unit's symbol name.
|
java.lang.String |
toString() |
|
static Length.Units |
valueOf(java.lang.String name) |
Returns 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.
|
public static final Length.Units METRE
public static final Length.Units POINT
1/72in
or 25.4/72mm
.
This is the unit used internally by the Length
object.public static final Length.Units KILOMETRE
1000m
.public static final Length.Units CENTIMETRE
0.01m
.public static final Length.Units MILLIMETRE
0.001m
.public static final Length.Units INCH
25.4mm
or 72pt
.public static Length.Units[] values()
for (Length.Units c : Length.Units.values()) System.out.println(c);
public static Length.Units valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic java.lang.String getSymbol()
public java.lang.String toString()
toString
in class java.lang.Enum<Length.Units>
public static Length.Units get(java.lang.String symbol)
symbol
- the symbol, e.g. m, or in.