public class Item
extends java.lang.Object
It represents an item throughout the execution of the algorithm
Constructor and Description |
---|
Item(int label)
It creates a new item by setting up its label
|
Modifier and Type | Method and Description |
---|---|
void |
addChild(Item child)
It adds a child item to a parent item
|
boolean |
equals(java.lang.Object obj)
It indicates whether some other item is "equal to" this one
|
java.util.ArrayList<Item> |
getChildren()
It returns the children of an item
|
int |
getLabel()
It returns the label associated with an item
|
int |
getSupport()
It returns the support of an item
|
boolean |
hasChildren()
It returns whether an item has children items
|
void |
setLabel(int label)
It sets the label associated with an item
|
void |
setSupport(int support)
It sets the support of an item
|
public Item(int label)
It creates a new item by setting up its label
label
- The label of the itempublic void setLabel(int label)
It sets the label associated with an item
label
- The label of the itempublic int getLabel()
It returns the label associated with an item
public void setSupport(int support)
It sets the support of an item
support
- The support of the itempublic int getSupport()
It returns the support of an item
public void addChild(Item child)
It adds a child item to a parent item
child
- The item to add to this itempublic boolean hasChildren()
It returns whether an item has children items
public java.util.ArrayList<Item> getChildren()
It returns the children of an item
public boolean equals(java.lang.Object obj)
It indicates whether some other item is "equal to" this one
equals
in class java.lang.Object
obj
- The reference object with which to compare