public class Value
extends java.lang.Number
As a style sheet may express values in several different units. This class purpose is to pack the value and the units it is expressed in into a single object.
Modifier and Type | Field and Description |
---|---|
StyleConstants.Units |
units
The value units.
|
double |
value
The value.
|
Constructor and Description |
---|
Value(StyleConstants.Units units,
double value)
New value.
|
Value(Value other)
New copy of another value.
|
Modifier and Type | Method and Description |
---|---|
double |
doubleValue() |
boolean |
equals(Value o) |
float |
floatValue() |
int |
intValue() |
long |
longValue() |
java.lang.String |
toString() |
public double value
public StyleConstants.Units units
public Value(StyleConstants.Units units, double value)
units
- The value units.value
- The value.public Value(Value other)
other
- The other value to copy.public float floatValue()
floatValue
in class java.lang.Number
public double doubleValue()
doubleValue
in class java.lang.Number
public int intValue()
intValue
in class java.lang.Number
public long longValue()
longValue
in class java.lang.Number
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(Value o)