public class Table extends Block
Modifier and Type | Field and Description |
---|---|
protected java.util.List |
blocks
The blocks located on top of the table.
|
protected java.lang.String |
name
The name of the table.
|
Constructor and Description |
---|
Table()
Create a new table.
|
Table(java.lang.String name,
java.awt.Color color)
Create a new table.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addBlock(Block block)
Add a block to this block.
|
void |
clear()
clear all blocks from the table.
|
boolean |
configurationEquals(Table table)
Check if two configurations are equal.
|
Block[] |
getAllBlocks()
Get all blocks on the table.
|
Block[][] |
getStacks()
Get the stacks on the table.
|
boolean |
isClear()
The table is always clear.
|
protected void |
removeBlock(Block block)
Remove a block from this block.
|
java.lang.String |
toString()
Create a string representation of this block.
|
protected java.lang.String name
protected java.util.List blocks
public Table()
public Table(java.lang.String name, java.awt.Color color)
name
- The name of the table.color
- The color of the table.public java.lang.String toString()
public Block[] getAllBlocks()
public Block[][] getStacks()
public void clear()
public boolean configurationEquals(Table table)
protected void addBlock(Block block)
protected void removeBlock(Block block)
removeBlock
in class Block