docs: protected Object[] getBatch() {
  
          Object[] objectArray = new Object[batchSize];
          objectArray[0] = get(); // always attempt to get at least 1, get() could
                                  // return null
                                  // if no factory was defined when instantiated.
  
          int numElements = getCurrentNumElements();
  
          for (int i = 1; i <= numElements && i < batchSize; i++) {
              objectArray[i] = get();
          }
  
          return objectArray;
      }