docs: public static <T> T[] ensureCapacity(final T[] oldElements, final int requiredLength)
      {
          T[] result = oldElements;
  
          if (oldElements.length < requiredLength)
          {
              result = Arrays.copyOf(oldElements, requiredLength);
          }
  
          return result;
      }