- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for ofInstance (0.04 sec)
-
android/guava-tests/test/com/google/common/base/SuppliersTest.java
new EqualsTester() .addEqualityGroup(Suppliers.ofInstance("foo"), Suppliers.ofInstance("foo")) .addEqualityGroup(Suppliers.ofInstance("bar")) .testEquals(); } public void testCompose_equals() { new EqualsTester() .addEqualityGroup( Suppliers.compose(Functions.constant(1), Suppliers.ofInstance("foo")),
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 17.9K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/CallablesTest.java
} @J2ktIncompatible @GwtIncompatible // threads public void testRenaming() throws Exception { String oldName = Thread.currentThread().getName(); Supplier<String> newName = Suppliers.ofInstance("MyCrazyThreadName"); Callable<@Nullable Void> callable = new Callable<@Nullable Void>() { @Override public @Nullable Void call() throws Exception {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 4.4K bytes - Viewed (0) -
guava/src/com/google/common/base/Suppliers.java
* supplier that is serializable, use {@code (Supplier<T> & Serializable) () -> instance}. */ public static <T extends @Nullable Object> Supplier<T> ofInstance( @ParametricNullness T instance) { return new SupplierOfInstance<>(instance); } private static final class SupplierOfInstance<T extends @Nullable Object> implements Supplier<T>, Serializable {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Aug 09 01:14:59 UTC 2025 - 16.5K bytes - Viewed (0) -
android/guava/src/com/google/common/base/Suppliers.java
* supplier that is serializable, use {@code (Supplier<T> & Serializable) () -> instance}. */ public static <T extends @Nullable Object> Supplier<T> ofInstance( @ParametricNullness T instance) { return new SupplierOfInstance<>(instance); } private static final class SupplierOfInstance<T extends @Nullable Object> implements Supplier<T>, Serializable {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Sat Aug 09 01:14:59 UTC 2025 - 16.5K bytes - Viewed (0) -
guava-tests/test/com/google/common/base/FunctionsTest.java
new EqualsTester() .addEqualityGroup(function, Functions.forSupplier(supplier)) .addEqualityGroup(Functions.forSupplier(new CountingSupplier())) .addEqualityGroup(Functions.forSupplier(Suppliers.ofInstance(12))) .addEqualityGroup(Functions.toStringFunction()) .testEquals(); } @J2ktIncompatible @GwtIncompatible // SerializableTester public void testForSupplierSerializable() {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 15.9K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/base/FunctionsTest.java
new EqualsTester() .addEqualityGroup(function, Functions.forSupplier(supplier)) .addEqualityGroup(Functions.forSupplier(new CountingSupplier())) .addEqualityGroup(Functions.forSupplier(Suppliers.ofInstance(12))) .addEqualityGroup(Functions.toStringFunction()) .testEquals(); } @J2ktIncompatible @GwtIncompatible // SerializableTester public void testForSupplierSerializable() {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 15.9K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/MoreExecutorsTest.java
} public void testThreadRenaming() { Executor renamingExecutor = renamingDecorator(newDirectExecutorService(), Suppliers.ofInstance("FooBar")); String oldName = Thread.currentThread().getName(); renamingExecutor.execute( new Runnable() { @Override public void run() {
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Tue May 13 18:46:00 UTC 2025 - 28K bytes - Viewed (0) -
android/guava/src/com/google/common/cache/CacheBuilder.java
@SuppressWarnings("GoodTime") // should be a Duration private static final int DEFAULT_REFRESH_NANOS = 0; static final Supplier<? extends StatsCounter> NULL_STATS_COUNTER = Suppliers.ofInstance( new StatsCounter() { @Override public void recordHits(int count) {} @Override public void recordMisses(int count) {}
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Thu Aug 07 16:05:33 UTC 2025 - 51.7K bytes - Viewed (0)