jill/src/main/java/io/github/agentsoz/jill/core/IntentionSelector.java
private boolean isStackValid(Agent agent, Stack255 agentExecutionStack) {
    if (agentExecutionStack == null) {
      return false;
    }
    final int esSize = agentExecutionStack.size();
    logger.trace("{} execution stack is {}/255 full", Log.logPrefix(agent.getId()), esSize);
    if (esSize == 0) {
      return false;
    }
    if (esSize >= 255) {
      logger.error("{} execution stack reached size limit of 255. Cannot continue.",
          Log.logPrefix(agent.getId()));
      return false;
    }
    return true;
  }
private boolean isStackValid(Agent agent, Stack255 agentExecutionStack) {
    if (agentExecutionStack == null) {
      return false;
    }
    final int esSize = agentExecutionStack.size();
    logger.trace("{} execution stack is {}/255 full", Log.logPrefix(agent.getId()), esSize);
    if (esSize == 0) {
      return false;
    }
    if (esSize >= 255) {
      logger.error("{} execution stack reached size limit of 255. Cannot continue.",
          Log.logPrefix(agent.getId()));
      return false;
    }
    return true;
  }
private boolean isStackValid ( Agent agent , Stack255 agentExecutionStack ) { if ( agentExecutionStack == null ) { return false ; } final int esSize = agentExecutionStack . size ( ) ; logger . trace ( "{} execution stack is {}/255 full" , Log . logPrefix ( agent . getId ( ) ) , esSize ) ; if ( esSize == 0 ) { return false ; } if ( esSize >= 255 ) { logger . error ( "{} execution stack reached size limit of 255. Cannot continue." , Log . logPrefix ( agent . getId ( ) ) ) ; return false ; } return true ; }
Checks if this agent's execution stack is valid. The stack is valid if it is not null or empty
and has not exceeded the maximum size limit of 255.

@param agent the agent whose stack is to be checked
@param agentExecutionStack that agent's execution stack
@return true if stack is valid, false otherwise
Checks if this agent s execution stack is valid . The stack is valid if it is not null or empty and has not exceeded the maximum size limit of 255 .