public class Value extends 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() |
String |
toString() |
byteValue, shortValuepublic 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 Numberpublic double doubleValue()
doubleValue in class Numberpublic boolean equals(Value o)
Copyright © 2015. All rights reserved.