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 Detail

      • EMPTY

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

      • 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

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

        java.lang.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

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