public class MultiselectDecisionItem extends Object implements Serializable
| Constructor and Description |
|---|
MultiselectDecisionItem(MultiselectDecisionItem parent,
String label,
String value)
Create a new decision item with label and value.
|
| Modifier and Type | Method and Description |
|---|---|
List<MultiselectDecisionItem> |
getChildren()
Get children for this item.
|
String |
getDisplayLabel()
Get display label for this item.
|
String |
getLabel()
Get label for this item.
|
MultiselectDecisionItem |
getParent()
Get parent for this item.
|
String |
getValue()
Get value for this item.
|
boolean |
isLeaf()
Whether the item is a leaf item at the rightmost column
|
boolean |
isRoot()
Whether the item is at the root of the tree.
|
void |
setChildren(List<MultiselectDecisionItem> children)
Set children for this item.
|
void |
setValue(String value)
Set value for this item.
|
String |
toString() |
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.
|
void |
visitSelectedItems(MultiselectDecisionItemVisitor visitor,
Queue<MultiselectVariableDescriptor> columns,
Queue<Integer> itemPath)
Visitor pattern implementation to walk through the tree collecting information.
|
static void |
visitSubTree(MultiselectDecisionItemVisitor visitor,
List<MultiselectDecisionItem> items,
Queue<MultiselectVariableDescriptor> columns)
Static visitor pattern implementation to walk through the tree collecting information.
|
void |
visitSubTree(MultiselectDecisionItemVisitor visitor,
Queue<MultiselectVariableDescriptor> columns)
Visitor pattern implementation to walk through the tree collecting information.
|
public MultiselectDecisionItem(MultiselectDecisionItem parent, String label, String value)
parent - parent item to traverse tree backwardslabel - label for display in selection listvalue - value for use in variablepublic void visitSubTree(MultiselectDecisionItemVisitor visitor, Queue<MultiselectVariableDescriptor> columns) throws Exception
visitor - visitor object or lambda collecting informationcolumns - column descriptions to go along with the itemsException - if an error occurs in visitorpublic static void visitSubTree(MultiselectDecisionItemVisitor visitor, List<MultiselectDecisionItem> items, Queue<MultiselectVariableDescriptor> columns) throws Exception
visitor - visitor object or lambda collecting informationitems - item list (column entries) to iteratecolumns - column descriptions to go along with the itemsException - if an error occurs in visitorpublic void visitSelectedItems(MultiselectDecisionItemVisitor visitor, Queue<MultiselectVariableDescriptor> columns, Queue<Integer> itemPath) throws Exception
visitor - visitor object or lambda collecting informationcolumns - column descriptions to go along with the itemsitemPath - indices of items in columns to select and walk throughException - if an error occurs in visitorpublic static void visitSelectedItems(MultiselectDecisionItemVisitor visitor, List<MultiselectDecisionItem> items, Queue<MultiselectVariableDescriptor> columns, Queue<Integer> itemPath) throws Exception
visitor - visitor object or lambda collecting informationitems - item list (column entries) to iteratecolumns - column descriptions to go along with the itemsitemPath - indices of items in columns to select and walk throughException - if an error occurs in visitorpublic String getLabel()
public String getValue()
public void setValue(String value)
value - value for this itempublic List<MultiselectDecisionItem> getChildren()
public void setChildren(List<MultiselectDecisionItem> children)
children - children for this itempublic boolean isRoot()
public boolean isLeaf()
public MultiselectDecisionItem getParent()
public String getDisplayLabel()
Copyright © 2016–2020. All rights reserved.