Permalink
Browse files

Make guard() receive a more specific type

  • Loading branch information...
dgomezferro committed May 31, 2012
1 parent 9bc3262 commit 4f01472812fcb789203c8e896ab7dded88eef323
@@ -36,7 +36,7 @@
* @param receivedMessage Message to be checked * @param receivedMessage Message to be checked
* @return true if this handler is the one that should be executed * @return true if this handler is the one that should be executed
*/ */
public boolean guardPredicate(Message receivedMessage); public boolean guardPredicate(M receivedMessage);
/** /**
* Processes a received message. * Processes a received message.
@@ -380,8 +380,8 @@ public boolean equalsDeep(TMessage other) {
private static class Handler implements MessageHandler<TMessage, State, TMessage> { private static class Handler implements MessageHandler<TMessage, State, TMessage> {
@Override @Override
public boolean guardPredicate(Message receivedMessage) { public boolean guardPredicate(TMessage receivedMessage) {
return receivedMessage instanceof TMessage; return true;
} }
@Override @Override

0 comments on commit 4f01472

Please sign in to comment.