Package com.onwbp.base.text

# Class NomenclatureItem<T>

java.lang.Object
com.onwbp.base.text.NomenclatureItem<T>

Direct Known Subclasses:
  `NomenclatureItemValue`

public abstract class NomenclatureItem<T> extends Object
A `NomenclatureItem` associates a value with one or more labels. Each label may be associated with a locale.

See Also:
  - `Nomenclature`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final Step`
  `_defaultLabel`
  `static final Step`
  `_value`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `abstract String`
  `getDefaultLabel()`
  Returns first label.
  `abstract String`
  `getLabel(int index)`
  Returns the label at the specified position (from 0 to the number of labels - 1).
  `abstract String`
  `getLabel(Locale aLocale)`
  `final T`
  `getValue()`
  Returns the value of this item.
  `boolean`
  `isDefaultItem()`
  Returns `true` if this item is the default item selected when an associated instance is undefined.
  `abstract boolean`
  `isLocalized()`
  `final boolean`
  `isValueItem()`
  Obsolete, always returns `true`.
  `void`
  `setDefaultItem(boolean isDefaultItem)`
  If the specified argument is `true`, then this item is the default item selected when an associated instance is undefined.
  `abstract void`
  `setDefaultLabel(String aString)`
  Sets first label.
  `abstract void`
  `setLabel(int index, String aString)`
  `void`
  `setValue(T aValue)`
  Replaces the value with the specified object.
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### _value

    public static final Step _value

  - ### _defaultLabel

    public static final Step _defaultLabel

- ## Method Details

  - ### getDefaultLabel

    public abstract String getDefaultLabel()
    Returns first label.

  - ### getLabel

    public abstract String getLabel(int index)
    Returns the label at the specified position (from 0 to the number of labels - 1).

  - ### isLocalized

    public abstract boolean isLocalized()

  - ### setDefaultLabel

    public abstract void setDefaultLabel(String aString)
    Sets first label.

  - ### setLabel

    public abstract void setLabel(int index, String aString)

  - ### getLabel

    public abstract String getLabel(Locale aLocale)

  - ### getValue

    public final T getValue()
    Returns the value of this item.

  - ### isDefaultItem

    public boolean isDefaultItem()
    Returns `true` if this item is the default item selected when an associated instance is undefined.

  - ### isValueItem

    public final boolean isValueItem()
    Obsolete, always returns `true`.

  - ### setDefaultItem

    public void setDefaultItem(boolean isDefaultItem)
    If the specified argument is `true`, then this item is the default item selected when an associated instance is undefined.

  - ### setValue

    public void setValue(T aValue)
    Replaces the value with the specified object.

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`