public int getLength() {
    int i;
    for(i = 0; i < items.length; i++) {
      try {
        if(items[i].length() == 0) { break; }
      } catch(NullPointerException e) {
        break;
      }
    }
    return i;
  }