code: private boolean blocked(Task task) throws InterruptedException
     {
        lock.lockInterruptibly();
  
        try
        {
           TaskAttribute executing =
                 enabled.size() > 0
                       ? enabled.get(enabled.size() - 1).getCommand().getTaskAttribute()
                       : null;
           {
              switch (task.getCommand().getTaskAttribute())
              {
                 case SIMPLE :
                    if (executing == null || executing == TaskAttribute.SIMPLE)
                       return false;
                    else
                       return true;
                 case HEAD_OF_QUEUE :
                    return false;
                 case ORDERED :
                    if (executing == null)
                       return false;
                    else
                       return true;
                 default :
                    throw new RuntimeException("Unsupported task tag: "
                          + task.getCommand().getTaskAttribute().name());
              }
           }
        }
        finally
        {
           lock.unlock();
        }
     }
docs: /*
  Checks if the given task is currently blocked.