public enum WeightUnit extends Enum<WeightUnit>
| Modifier and Type | Method and Description |
|---|---|
String |
decorateLabel(String label) |
String |
decorateTip(String tip) |
abstract Float |
fromEntity(Float weight)
Transform the given
weight coming from db to ui. |
String |
getLabel() |
String |
getShortLabel() |
abstract Float |
toEntity(Float weight)
Transform the given
weight coming from ui to db. |
static WeightUnit |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static WeightUnit[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final WeightUnit G
public static final WeightUnit KG
public static WeightUnit[] values()
for (WeightUnit c : WeightUnit.values()) System.out.println(c);
public static WeightUnit valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant
with the specified nameNullPointerException - if the argument is nullpublic String getLabel()
public String getShortLabel()
public abstract Float fromEntity(Float weight)
weight coming from db to ui.weight - weigth to transformweight.public abstract Float toEntity(Float weight)
weight coming from ui to db.weight - weigth to transformweight.Copyright © 2012–2013 Ifremer. All rights reserved.