Package com.onwbp.base.text
Class NomenclatureItemValue<T>
java.lang.Object
com.onwbp.base.text.NomenclatureItem<T>
com.onwbp.base.text.NomenclatureItemValue<T>
A
NomenclatureItemValue
is a label value in a containing Nomenclature
. The
value should correspond to the associated type.
The code that implements the layout must decide how to display an instance of this class.
- See Also:
-
Field Summary
Fields inherited from class com.onwbp.base.text.NomenclatureItem
_defaultLabel, _value
-
Constructor Summary
ConstructorDescriptionNomenclatureItemValue
(T newValue, String newLabel) NomenclatureItemValue
(T newValue, String[] newLabels) NomenclatureItemValue
(T newValue, String[] newLabels, Locale[] locales) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns first label.getLabel
(int index) Returns the label at the specified position (from 0 to the number of labels - 1).Returns the label defined for the specified locale.int
hashCode()
boolean
void
setDefaultLabel
(String aString) Sets first label.void
Replaces the label at the specified position in all labels with the specified string.Methods inherited from class com.onwbp.base.text.NomenclatureItem
getValue, isDefaultItem, isValueItem, setDefaultItem, setValue, toString
-
Constructor Details
-
NomenclatureItemValue
public NomenclatureItemValue() -
NomenclatureItemValue
-
NomenclatureItemValue
-
NomenclatureItemValue
-
-
Method Details
-
equals
-
hashCode
public int hashCode() -
isLocalized
public boolean isLocalized()- Specified by:
isLocalized
in classNomenclatureItem<T>
-
getLabel
Returns the label defined for the specified locale.- Specified by:
getLabel
in classNomenclatureItem<T>
- Parameters:
aLocale
- the locale to search for. Can benull
.- Returns:
null
if specified locale does not exist or anull
label is defined for the locale.
-
setLabel
Replaces the label at the specified position in all labels with the specified string.- Specified by:
setLabel
in classNomenclatureItem<T>
-
getDefaultLabel
Returns first label.- Specified by:
getDefaultLabel
in classNomenclatureItem<T>
-
getLabel
Returns the label at the specified position (from 0 to the number of labels - 1).- Specified by:
getLabel
in classNomenclatureItem<T>
-
setDefaultLabel
Sets first label.- Specified by:
setDefaultLabel
in classNomenclatureItem<T>
-