V
- is the generic type of the value
.public interface Segment<V extends Number> extends SimpleDatatype<V>, AttributeReadMinimumValue<V>, AttributeReadMaximumValue<V>
Color
.Modifier and Type | Method and Description |
---|---|
double |
getValueAsFactor() |
int |
getValueAsPercent() |
String |
toString()
|
String |
toStringAsFactor() |
String |
toStringAsPercent() |
getValue
getMinimumValue
getMaximumValue
double getValueAsFactor()
0
to 1
([0, 1]
).int getValueAsPercent()
0
to 100
. Will be rounded to an
int
. If you want to keep (potential) precision, use getValueAsFactor()
and
divide by 100
.String toStringAsPercent()
value
as String
formatted in percent. E.g. "51.2%".getValueAsPercent()
String toString()
String
representation of this Datatype
. While the general contract
of Object.toString()
is very weak and mainly used for debugging, the contract here is very
strong. The returned String
has to be suitable for end-users and official output to any kind of
sink. NlsMessage
for this purpose and implement
NlsObject
if you want to support I18N/L10N.Copyright © 2001–2014 mmm-Team. All rights reserved.