code: @NotNull
      public Object[] toArray() {
          return toArray(new IntFunction<Object[]>() {
  
              @NotNull
              @Override
              public Object[] apply(int value) {
                  return new Object[value];
              }
          });
      }
docs: Collects elements to an array.
  
  <p>This is a terminal operation.
  
  @return the result of collect elements
  @see #toArray(com.annimon.stream.function.IntFunction)