jill/src/main/java/io/github/agentsoz/jill/lang/Agent.java
public boolean send(int id, Goal msg) {
    AObject obj = agents.get(id);
    if (obj == null) {
      logger.warn("{} attempted to send a message to unknown agent id '{}'", Log.logPrefix(getId()),
          id);
      return false;
    }
    logger.debug("{} is sending message of type {} to agent {}", Log.logPrefix(getId()),
        msg.getClass().getSimpleName(), id);
    ((Agent) obj).post(msg);
    return true;
  }
public boolean send(int id, Goal msg) {
    AObject obj = agents.get(id);
    if (obj == null) {
      logger.warn("{} attempted to send a message to unknown agent id '{}'", Log.logPrefix(getId()),
          id);
      return false;
    }
    logger.debug("{} is sending message of type {} to agent {}", Log.logPrefix(getId()),
        msg.getClass().getSimpleName(), id);
    ((Agent) obj).post(msg);
    return true;
  }
public boolean send ( int id , Goal msg ) { AObject obj = agents . get ( id ) ; if ( obj == null ) { logger . warn ( "{} attempted to send a message to unknown agent id '{}'" , Log . logPrefix ( getId ( ) ) , id ) ; return false ; } logger . debug ( "{} is sending message of type {} to agent {}" , Log . logPrefix ( getId ( ) ) , msg . getClass ( ) . getSimpleName ( ) , id ) ; ( ( Agent ) obj ) . post ( msg ) ; return true ; }
Send a message to an agent.

@param id the agent to send the message to
@param msg the message to send
@return true if the message was sent successfully, false otherwise
Send a message to an agent .