Home | History | Annotate | Download | only in base

Lines Matching refs:Supplier

40    * Returns a new supplier which is the composition of the provided function
41 * and supplier. In other words, the new supplier's value will be computed by
43 * {@code function} to that value. Note that the resulting supplier will not
46 public static <F, T> Supplier<T> compose(
47 Function<? super F, T> function, Supplier<F> first) {
54 implements Supplier<T>, Serializable {
56 final Supplier<? extends F> first;
59 Supplier<? extends F> first) {
70 * Returns a supplier which caches the instance retrieved during the first
75 * <p>The returned supplier is thread-safe. The supplier's serialized form
79 public static <T> Supplier<T> memoize(Supplier<T> delegate) {
84 implements Supplier<T>, Serializable {
85 final Supplier<T> delegate;
89 MemoizingSupplier(Supplier<T> delegate) {
105 * Returns a supplier that caches the instance supplied by the delegate and
112 * <p>The returned supplier is thread-safe. The supplier's serialized form
122 public static <T> Supplier<T> memoizeWithExpiration(
123 Supplier<T> delegate, long duration, TimeUnit unit) {
128 implements Supplier<T>, Serializable {
129 final Supplier<T> delegate;
136 Supplier<T> delegate, long duration, TimeUnit unit) {
155 * Returns a supplier that always supplies {@code instance}.
157 public static <T> Supplier<T> ofInstance(@Nullable T instance) {
162 implements Supplier<T>, Serializable {
175 * Returns a supplier whose {@code get()} method synchronizes on
178 public static <T> Supplier<T> synchronizedSupplier(Supplier<T> delegate) {
183 implements Supplier<T>, Serializable {
184 final Supplier<T> delegate;
186 ThreadSafeSupplier(Supplier<T> delegate) {