Class MultiselectDecisionItem

  • All Implemented Interfaces:
    Serializable

    public class MultiselectDecisionItem
    extends Object
    implements Serializable
    Multiselect decision item will be the individual select box row to use in decision tree.
    See Also:
    Serialized Form
    • Constructor Detail

      • MultiselectDecisionItem

        @DataBoundConstructor
        public MultiselectDecisionItem​(String label,
                                       String value)
        Create a new decision item with label and value.
        Parameters:
        label - label for display in selection list
        value - value for use in variable
    • Method Detail

      • visitSelectedItems

        public void visitSelectedItems​(MultiselectDecisionItemVisitor visitor,
                                       Queue<MultiselectVariableDescriptor> columns,
                                       Queue<Integer> itemPath)
        Visitor pattern implementation to walk through the tree collecting information. Select the column items by their column index (no iteration involved).
        Parameters:
        visitor - visitor object or lambda collecting information
        columns - column descriptions to go along with the items
        itemPath - indices of items in columns to select and walk through
      • visitSelectedItems

        public static void visitSelectedItems​(MultiselectDecisionItemVisitor visitor,
                                              List<MultiselectDecisionItem> items,
                                              Queue<MultiselectVariableDescriptor> columns,
                                              Queue<Integer> itemPath)
        Static visitor pattern implementation to walk through the tree collecting information. Select the column items by their column index (no iteration involved).
        Parameters:
        visitor - visitor object or lambda collecting information
        items - item list (column entries) to iterate
        columns - column descriptions to go along with the items
        itemPath - indices of items in columns to select and walk through
      • getLabel

        public String getLabel()
        Get label for this item.
        Returns:
        label for this item
      • setLabel

        @DataBoundSetter
        public void setLabel​(String label)
        Set label for this item.
        Parameters:
        label - the new label
      • getValue

        public String getValue()
        Get value for this item.
        Returns:
        value for this item
      • setValue

        @DataBoundSetter
        public void setValue​(String value)
        Set value for this item.
        Parameters:
        value - value for this item
      • setChildren

        @DataBoundSetter
        public void setChildren​(List<MultiselectDecisionItem> children)
        Set children for this item.
        Parameters:
        children - children for this item
      • isRoot

        public boolean isRoot()
        Whether the item is at the root of the tree.
        Returns:
        whether the item is the root item
      • isLeaf

        public boolean isLeaf()
        Whether the item is a leaf item at the rightmost column
        Returns:
        whether the item is a leaf item at the rightmost column
      • setParent

        public void setParent​(MultiselectDecisionItem parent)
        Set parent for this item.
        Parameters:
        parent - the new parent object
      • getDisplayLabel

        public String getDisplayLabel()
        Get display label for this item.
        Returns:
        display label for this item