Package jadex.bdiv3.examples.blocksworld
Class Table
- java.lang.Object
- 
- jadex.bdiv3.examples.blocksworld.Block
- 
- jadex.bdiv3.examples.blocksworld.Table
 
 
- 
 public class Table extends Block A table in the blocks-world. In contrast to a block, a table may have multiple blocks on top.
- 
- 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddBlock(Block block)Add a block to this block.voidclear()clear all blocks from the table.booleanconfigurationEquals(Table table)Check if two configurations are equal.Block[]getAllBlocks()Get all blocks on the table.Block[][]getStacks()Get the stacks on the table.booleanisClear()The table is always clear.protected voidremoveBlock(Block block)Remove a block from this block.java.lang.StringtoString()Create a string representation of this block.
 
- 
- 
- 
Method Detail- 
toStringpublic java.lang.String toString() Create a string representation of this block.
 - 
getAllBlockspublic Block[] getAllBlocks() Get all blocks on the table. Also returns blocks which are located on other blocks on the table.
 - 
getStackspublic Block[][] getStacks() Get the stacks on the table.
 - 
clearpublic void clear() clear all blocks from the table.
 - 
configurationEqualspublic boolean configurationEquals(Table table) Check if two configurations are equal.
 - 
addBlockprotected void addBlock(Block block) Add a block to this block.
 - 
removeBlockprotected void removeBlock(Block block) Remove a block from this block.- Overrides:
- removeBlockin class- Block
 
 
- 
 
-