code: public int add(final Message msg, boolean resize) {
          if(msg == null) return 0;
          if(index >= messages.length) {
              if(!resize)
                  return 0;
              resize();
          }
          messages[index++]=msg;
          return 1;
      }
docs: Adds a message to the table
  @param msg the message
  @param resize whether or not to resize the table. If true, the method will always return 1
  @return always 1 if resize==true, else 1 if the message was added or 0 if not