Returns an infinite {@code ObjIterator}.

@param supplier
@return
551852
public static <T> ObjIterator<T> generate(final Supplier<T> supplier) {
        N.checkArgNotNull(supplier);

        return new ObjIterator<T>() {
            @Override
            public boolean hasNext() {
                return true;
            }

            @Override
            public T next() {
                return supplier.get();
            }
        };
    }
1284144
public static <T> Supplier<T> synchronizedSupplier(Supplier<T> delegate) {
		return new ThreadSafeSupplier<>(Objects.requireNonNull(delegate));
	}
98106
public static <T> Function<Object, T> forSupplier(Supplier<T> supplier) {
		return input -> supplier.get();
	}
810189
public <U> FutureStream<U> generate(final Supplier<U> generate) {

        return construct(StreamSupport.<U> stream(new InfiniteClosingSpliteratorFromSupplier<U>(
                                                                                                Long.MAX_VALUE, generate, new Subscription()),
                                                  false));
    }
833336
public static <U> CompletableFuture<U> supplyAsync(Supplier<U> supplier) {
        return CompletableFuture
                .supplyAsync(handleSupplierWithException(supplier));
    }
543727
protected Supplier<CompletableFuture<ExecutionResult>> supplyAsync(
      Supplier<CompletableFuture<ExecutionResult>> supplier, Scheduler scheduler, FailsafeFuture<Object> future) {
    return () -> {
      ExecutionResult result = preExecute();
      if (result != null)
        return CompletableFuture.completedFuture(result);

      return supplier.get().thenCompose(s -> postExecuteAsync(s, scheduler, future));
    };
  }
919478
public static ByteIterator generate(final ByteSupplier supplier) {
        N.checkArgNotNull(supplier);

        return new ByteIterator() {
            @Override
            public boolean hasNext() {
                return true;
            }

            @Override
            public byte nextByte() {
                return supplier.getAsByte();
            }
        };
    }
818174
@Override
    public ListT<W,T> onEmptyGet(final Supplier<? extends T> supplier) {

        return (ListT<W,T>) FoldableTransformerSeq.super.onEmptyGet(supplier);
    }
1109459
@Nonnull
	public static <T> Supplier<T> supplierFrom(Consumer<SupplierBuilder<T>> buildingFunction) {
		SupplierBuilder builder = new SupplierBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
996961
public static <A> Lazy<A> lazy(Supplier<A> supplier) {
        return new Later<>(fn0(supplier));
    }
858078
public <T> Source<T> from(Supplier<T> supplier) {
		Assert.notNull(supplier, "Supplier must not be null");
		Source<T> source = getSource(supplier);
		if (this.sourceOperator != null) {
			source = this.sourceOperator.apply(source);
		}
		return source;
	}
89027
public static LongIterator generate(final LongSupplier supplier) {
        N.checkArgNotNull(supplier);

        return new LongIterator() {
            @Override
            public boolean hasNext() {
                return true;
            }

            @Override
            public long nextLong() {
                return supplier.getAsLong();
            }
        };
    }
1154655
public static <T, E extends Exception> Supplier<T> sneaked(SneakySupplier<T, E> supplier) {
    return () -> {
      @SuppressWarnings("unchecked")
      SneakySupplier<T, RuntimeException> castedSupplier =
          (SneakySupplier<T, RuntimeException>) supplier;
      return castedSupplier.get();
    };
  }
1021090
public static <U> CompletableFuture<U> supplyAsync(Supplier<U> supplier,
            Executor executor) {
        return CompletableFuture
                .supplyAsync(handleSupplierWithException(supplier), executor);
    }
329980
public static <T> Supplier<T> supplier(CheckedSupplier<T> supplier) {
        return supplier(supplier, THROWABLE_TO_RUNTIME_EXCEPTION);
    }
940679
public static <R> R supplierIfNull(R target, Supplier<R> supplier) {
        return Optional.ofNullable(target).orElseGet(supplier);
    }
603510
public static <T, E extends Throwable> @NonNull Supplier<T> unwrappingRethrowSupplier(final @NonNull ThrowingSupplier<T, E> supplier) {
    return () -> {
      try {
        return supplier.throwingGet();
      } catch(final Throwable t) {
        throw rethrow(unwrap(t));
      }
    };
  }