- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 17 for ofInstance (0.27 sec)
-
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")),
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Fri Feb 09 15:49:48 GMT 2024 - 18.1K bytes - Viewed (0) -
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")),
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Fri Feb 09 15:49:48 GMT 2024 - 18.1K 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(); final Supplier<String> newName = Suppliers.ofInstance("MyCrazyThreadName"); Callable<@Nullable Void> callable = new Callable<@Nullable Void>() { @Override public @Nullable Void call() throws Exception {
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Tue Feb 13 14:28:25 GMT 2024 - 5.4K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/CallablesTest.java
} } @J2ktIncompatible @GwtIncompatible // threads public void testRenaming() throws Exception { String oldName = Thread.currentThread().getName(); final Supplier<String> newName = Suppliers.ofInstance("MyCrazyThreadName"); Callable<@Nullable Void> callable = new Callable<@Nullable Void>() { @Override public @Nullable Void call() throws Exception {
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Tue Feb 13 14:28:25 GMT 2024 - 5.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/base/OptionalTest.java
assertEquals("a", Optional.of("a").or(Suppliers.ofInstance("fallback"))); } public void testOr_supplier_absent() { assertEquals("fallback", Optional.absent().or(Suppliers.ofInstance("fallback"))); } public void testOr_nullSupplier_absent() { Supplier<Object> nullSupplier = (Supplier<Object>) Suppliers.<@Nullable Object>ofInstance(null); Optional<Object> absentOptional = Optional.absent();
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed Feb 21 18:32:41 GMT 2024 - 10.5K bytes - Viewed (0) -
guava-tests/test/com/google/common/cache/CacheBuilderSpecTest.java
} @SuppressWarnings("ReturnValueIgnored") public void testMaximumWeight_withoutWeigher() { CacheBuilder<Object, Object> builder = CacheBuilder.from(parse("maximumWeight=9000")); assertThrows( IllegalStateException.class, () -> builder.build(CacheLoader.from(Suppliers.ofInstance(null)))); }
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 19.2K bytes - Viewed (0) -
guava-tests/test/com/google/common/base/OptionalTest.java
assertEquals("a", Optional.of("a").or(Suppliers.ofInstance("fallback"))); } public void testOr_supplier_absent() { assertEquals("fallback", Optional.absent().or(Suppliers.ofInstance("fallback"))); } public void testOr_nullSupplier_absent() { Supplier<Object> nullSupplier = (Supplier<Object>) Suppliers.<@Nullable Object>ofInstance(null); Optional<Object> absentOptional = Optional.absent();
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Wed Feb 21 18:32:41 GMT 2024 - 11.2K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/cache/CacheBuilderSpecTest.java
} @SuppressWarnings("ReturnValueIgnored") public void testMaximumWeight_withoutWeigher() { CacheBuilder<Object, Object> builder = CacheBuilder.from(parse("maximumWeight=9000")); assertThrows( IllegalStateException.class, () -> builder.build(CacheLoader.from(Suppliers.ofInstance(null)))); }
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 19.2K bytes - Viewed (0) -
guava/src/com/google/common/base/Suppliers.java
} private static final long serialVersionUID = 0; } /** Returns a supplier that always supplies {@code instance}. */ public static <T extends @Nullable Object> Supplier<T> ofInstance( @ParametricNullness T instance) { return new SupplierOfInstance<>(instance); } private static class SupplierOfInstance<T extends @Nullable Object> implements Supplier<T>, Serializable {
Java - Registered: Fri Apr 05 12:43:09 GMT 2024 - Last Modified: Mon Apr 01 16:15:01 GMT 2024 - 15.3K bytes - Viewed (0) -
android/guava/src/com/google/common/base/Suppliers.java
} private static final long serialVersionUID = 0; } /** Returns a supplier that always supplies {@code instance}. */ public static <T extends @Nullable Object> Supplier<T> ofInstance( @ParametricNullness T instance) { return new SupplierOfInstance<>(instance); } private static class SupplierOfInstance<T extends @Nullable Object> implements Supplier<T>, Serializable {
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Mon Apr 01 16:15:01 GMT 2024 - 15.3K bytes - Viewed (0)