Class ListItem


  • public class ListItem
    extends Object
    An entry in a List or in a Tree.
    Version:
    $Id: 56adb64862167c6bd3e1db8582130fa6a6c098aa $
    • Field Detail

      • ID_COMPARATOR

        protected static final Comparator<ListItem> ID_COMPARATOR
        Comparator that orders list items on their identifiers, keeping null items at the end.
      • VALUE_COMPARATOR

        protected static final Comparator<ListItem> VALUE_COMPARATOR
        Comparator that orders list items on their values, keeping null items at the end.
    • Constructor Detail

      • ListItem

        public ListItem​(String id)
        Constructor that initializes both the internal ID and the displayed value with the same value, leaving the parent field empty.
        Parameters:
        id - the value to use for the id and the displayed value
      • ListItem

        public ListItem​(String id,
                        String value)
        Constructor that initializes the internal ID and the displayed value, leaving the parent field empty.
        Parameters:
        id - the value to use for the internal id
        value - the value to use for the displayed value
      • ListItem

        public ListItem​(String id,
                        String value,
                        String parent)
        Constructor that initializes all of the internal ID, the displayed value, and the parent fields.
        Parameters:
        id - the value to use for the internal id
        value - the value to use for the displayed value
        parent - the value to use for the item's parent
    • Method Detail

      • getId

        public String getId()
      • setId

        public void setId​(String id)
      • getValue

        public String getValue()
      • setValue

        public void setValue​(String value)
      • getParent

        public String getParent()
      • setParent

        public void setParent​(String parent)