|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcodeblocks.BlockLink
public class BlockLink
A class that stores information about a potential block connection. Each BlockLink instance stores the Block IDs of the "plug" and "socket" and two block connectors, one from each, with a possible connection. In block linking, a "plug" can be either a before or plug connector, while a "socket" can either be a after or socket connector. Plugs can only connect to other socket connectors, while before connectors can connect to after and command socket connectors.
Method Summary | |
---|---|
void |
connect()
This method actually connects the two blocks stored in this BlockLink object. |
void |
disconnect()
|
static BlockLink |
getBlockLink(Block block1,
Block block2,
BlockConnector socket1,
BlockConnector socket2)
Factory method for creating BlockLink objects |
java.lang.Long |
getLastBlockID()
|
BlockConnector |
getPlug()
|
java.lang.Long |
getPlugBlockID()
|
BlockConnector |
getSocket()
|
java.lang.Long |
getSocketBlockID()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public BlockConnector getPlug()
public BlockConnector getSocket()
public java.lang.Long getPlugBlockID()
public java.lang.Long getSocketBlockID()
public java.lang.Long getLastBlockID()
public void connect()
public void disconnect()
public static BlockLink getBlockLink(Block block1, Block block2, BlockConnector socket1, BlockConnector socket2)
block1
- one of the Block objects in the potential linkblock2
- the other Block objectsocket1
- the BlockConnector from block1socket2
- the BlockConnector from block2
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |