Package jadex.rules.examples.blocksworld
Class Table
- java.lang.Object
- 
- jadex.rules.examples.blocksworld.Block
- 
- jadex.rules.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.java.util.ListgetBlocks()Get the blocks.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.- 
Methods inherited from class jadex.rules.examples.blocksworld.BlockaddPropertyChangeListener, equals, getColor, getLower, getNumber, hashCode, removePropertyChangeListener, setLower, stackOn
 
- 
 
- 
- 
- 
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
 
 - 
getBlockspublic java.util.List getBlocks() Get the blocks.- Returns:
- The blocks.
 
 
- 
 
-