V
- is the generic type of the value
.public abstract class AbstractSegment<V extends Number> extends AbstractSimpleDatatype<V> implements Segment<V>
Segment
.Modifier and Type | Field and Description |
---|---|
private static long |
serialVersionUID
UID for serialization.
|
Modifier | Constructor and Description |
---|---|
protected |
AbstractSegment()
The constructor for de-serialization in GWT.
|
|
AbstractSegment(V value)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
private static String |
formatDouble(double d) |
int |
getValueAsPercent() |
String |
toStringAsFactor() |
String |
toStringAsPercent() |
getValue
equals, hashCode, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getValueAsFactor, toString
getValue
getMinimumValue
getMaximumValue
private static final long serialVersionUID
protected AbstractSegment()
public int getValueAsPercent()
getValueAsPercent
in interface Segment<V extends Number>
0
to 100
. Will be rounded to an
int
. If you want to keep (potential) precision, use Segment.getValueAsFactor()
and
divide by 100
.public String toStringAsFactor()
public String toStringAsPercent()
toStringAsPercent
in interface Segment<V extends Number>
value
as String
formatted in percent. E.g. "51.2%".Segment.getValueAsPercent()
Copyright © 2001–2014 mmm-Team. All rights reserved.