codeblocks
Interface LinkRule
- All Known Implementing Classes:
- CommandRule, InfixRule, SocketRule
public interface LinkRule
LinkRule
specifies a rule for Block
linking.
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 socket1block2
- the associated Block
of socket2socket1
- a Socket
of block1socket2
- a Socket
of block2
- Returns:
- true if the two sockets of the two blocks can link; false if not
isMandatory
boolean isMandatory()