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.Numberpublic double doubleValue()
doubleValue in class java.lang.Numberpublic int intValue()
intValue in class java.lang.Numberpublic long longValue()
longValue in class java.lang.Numberpublic java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(Value o)