Interface ICodeItem

All Known Implementing Classes:
CodeItemImpl

public interface ICodeItem
A code with an item that is used for comboboxes or spinners. A code item optionally contains a plain String code and a KString. HTML support may have been defined in the container in question.

The code item is invariable.

Author:
Christopher Mindus
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final ICodeItem[]
    An empty array of a code item.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the code string.
    Gets the item text as a KString.
    Gets the item text as a String.
    Gets the value.
    boolean
    Checks if this item has a code.
    boolean
    Returns whether the item is a KString or not.
  • Field Details

    • EMPTY

      static final ICodeItem[] EMPTY
      An empty array of a code item.
  • Method Details

    • hasCode

      boolean hasCode()
      Checks if this item has a code.
      Returns:
      true if code is present, false otherwise.
    • isKString

      boolean isKString()
      Returns whether the item is a KString or not.
      Returns:
      true if item is a KString, false for String.
    • getCode

      String getCode()
      Gets the code string.
      Returns:
      The optional code string, perhaps null for none.
    • getString

      String getString()
      Gets the item text as a String.
      Returns:
      The item String, potentially converted from KString.
    • getKString

      KString getKString()
      Gets the item text as a KString.
      Returns:
      The item KString, potentially converted from String.
    • getValue

      Object getValue()
      Gets the value.
      Returns:
      Either a String or a KString.