public class SimpleLength extends Object implements Length
| Modifier and Type | Class and Description |
|---|---|
static class |
SimpleLength.Unit
A unit.
|
MAX_DELTA, NULL_LENGTH| Modifier and Type | Method and Description |
|---|---|
static SimpleLength |
cm(double value)
Create an simple length in centimeters
|
static SimpleLength |
em(double value)
Create an simple length in em
|
boolean |
equals(Object o)
Warning: this method does not compare different units.
|
String |
getValue() |
int |
hashCode() |
static SimpleLength |
in(double value)
Create an simple length in inches
|
boolean |
isNotNull() |
static SimpleLength |
mm(double value)
Create an simple length in millimeters
|
static SimpleLength |
pc(double value)
Create an simple length in picas
|
static SimpleLength |
pt(double value)
Create an simple length in points
|
String |
toString() |
public static SimpleLength mm(double value)
value - the length in millimeterspublic static SimpleLength cm(double value)
value - the length in centimeterspublic static SimpleLength in(double value)
value - the length in inchespublic static SimpleLength pt(double value)
value - the length in pointspublic static SimpleLength pc(double value)
value - the length in picaspublic static SimpleLength em(double value)
value - the length in emspublic boolean equals(Object o)
SimpleLength.mm(10).equals(SimpleLenght.cm(1)) is false.public String getValue()
getValue in interface AttributeValueCopyright © 2016–2021. All rights reserved.