MCPcopy Create free account
hub / github.com/antlr/codebuff / ofInstance

Method ofInstance

corpus/java/training/guava/base/Suppliers.java:216–218  ·  view source on GitHub ↗

Returns a supplier that always supplies instance.

(@Nullable T instance)

Source from the content-addressed store, hash-verified

214 * Returns a supplier that always supplies {@code instance}.
215 */
216 public static <T> Supplier<T> ofInstance(@Nullable T instance) {
217 return new SupplierOfInstance<T>(instance);
218 }
219
220 private static class SupplierOfInstance<T> implements Supplier<T>, Serializable {
221 final T instance;

Callers 1

CacheBuilderClass · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected