codeblocks
Interface LinkRule

All Known Implementing Classes:
CommandRule, InfixRule, SocketRule

public interface LinkRule

LinkRule specifies a rule for Block linking.


Method Summary
 boolean canLink(Block block1, Block block2, BlockConnector socket1, BlockConnector socket2)
          Returns true if the two sockets of the two blocks can link; false if not
 boolean isMandatory()
           
 

Method Detail

canLink

boolean canLink(Block block1,
                Block block2,
                BlockConnector socket1,
                BlockConnector socket2)
Returns true if the two sockets of the two blocks can link; false if not

Parameters:
block1 - the associated Block of socket1
block2 - the associated Block of socket2
socket1 - a Socket of block1
socket2 - a Socket of block2
Returns:
true if the two sockets of the two blocks can link; false if not

isMandatory

boolean isMandatory()