Home
last modified time | relevance | path

Searched refs:ofInstance (Results 1 – 18 of 18) sorted by relevance

/external/guava/guava-tests/test/com/google/common/base/
DSuppliersTest.java271 Supplier<Object> objectSupplier = Suppliers.ofInstance(toBeSupplied); in testOfInstanceSuppliesSameInstance()
277 Supplier<Integer> nullSupplier = Suppliers.ofInstance(null); in testOfInstanceSuppliesNull()
424 Supplier<Integer> supplier = Suppliers.ofInstance(14); in testSupplierFunction()
432 assertEquals(Integer.valueOf(5), reserialize(Suppliers.ofInstance(5)).get()); in testSerialization()
435 reserialize(Suppliers.compose(Functions.identity(), Suppliers.ofInstance(5))).get()); in testSerialization()
436 assertEquals(Integer.valueOf(5), reserialize(Suppliers.memoize(Suppliers.ofInstance(5))).get()); in testSerialization()
439 reserialize(Suppliers.memoizeWithExpiration(Suppliers.ofInstance(5), 30, TimeUnit.SECONDS)) in testSerialization()
443 reserialize(Suppliers.synchronizedSupplier(Suppliers.ofInstance(5))).get()); in testSerialization()
459 .addEqualityGroup(Suppliers.ofInstance("foo"), Suppliers.ofInstance("foo")) in testOfInstance_equals()
460 .addEqualityGroup(Suppliers.ofInstance("bar")) in testOfInstance_equals()
[all …]
DOptionalTest.java114 assertEquals("a", Optional.of("a").or(Suppliers.ofInstance("fallback"))); in testOr_supplier_present()
118 assertEquals("fallback", Optional.absent().or(Suppliers.ofInstance("fallback"))); in testOr_supplier_absent()
122 Supplier<Object> nullSupplier = Suppliers.ofInstance(null); in testOr_nullSupplier_absent()
132 Supplier<String> nullSupplier = Suppliers.ofInstance(null); in testOr_nullSupplier_present()
DFunctionsTest.java404 .addEqualityGroup(Functions.forSupplier(Suppliers.ofInstance(12))) in testForSupplier()
/external/guava/android/guava-tests/test/com/google/common/base/
DSuppliersTest.java271 Supplier<Object> objectSupplier = Suppliers.ofInstance(toBeSupplied); in testOfInstanceSuppliesSameInstance()
277 Supplier<Integer> nullSupplier = Suppliers.ofInstance(null); in testOfInstanceSuppliesNull()
424 Supplier<Integer> supplier = Suppliers.ofInstance(14); in testSupplierFunction()
432 assertEquals(Integer.valueOf(5), reserialize(Suppliers.ofInstance(5)).get()); in testSerialization()
435 reserialize(Suppliers.compose(Functions.identity(), Suppliers.ofInstance(5))).get()); in testSerialization()
436 assertEquals(Integer.valueOf(5), reserialize(Suppliers.memoize(Suppliers.ofInstance(5))).get()); in testSerialization()
439 reserialize(Suppliers.memoizeWithExpiration(Suppliers.ofInstance(5), 30, TimeUnit.SECONDS)) in testSerialization()
443 reserialize(Suppliers.synchronizedSupplier(Suppliers.ofInstance(5))).get()); in testSerialization()
459 .addEqualityGroup(Suppliers.ofInstance("foo"), Suppliers.ofInstance("foo")) in testOfInstance_equals()
460 .addEqualityGroup(Suppliers.ofInstance("bar")) in testOfInstance_equals()
[all …]
DOptionalTest.java97 assertEquals("a", Optional.of("a").or(Suppliers.ofInstance("fallback"))); in testOr_supplier_present()
101 assertEquals("fallback", Optional.absent().or(Suppliers.ofInstance("fallback"))); in testOr_supplier_absent()
105 Supplier<Object> nullSupplier = Suppliers.ofInstance(null); in testOr_nullSupplier_absent()
115 Supplier<String> nullSupplier = Suppliers.ofInstance(null); in testOr_nullSupplier_present()
DFunctionsTest.java404 .addEqualityGroup(Functions.forSupplier(Suppliers.ofInstance(12))) in testForSupplier()
/external/mockito/src/main/java/org/mockito/internal/configuration/injection/
DMockInjection.java35 public static OngoingMockInjection onField(Field field, Object ofInstance) { in onField() argument
36 return new OngoingMockInjection(field, ofInstance); in onField()
47 public static OngoingMockInjection onFields(Set<Field> fields, Object ofInstance) { in onFields() argument
48 return new OngoingMockInjection(fields, ofInstance); in onFields()
/external/guava/android/guava-tests/test/com/google/common/util/concurrent/
DCallablesTest.java92 final Supplier<String> newName = Suppliers.ofInstance("MyCrazyThreadName"); in testRenaming()
108 final Supplier<String> newName = Suppliers.ofInstance("MyCrazyThreadName"); in testRenaming_exceptionalReturn()
143 Supplier<String> newName = Suppliers.ofInstance("MyCrazyThreadName"); in testRenaming_noPermissions()
DMoreExecutorsTest.java646 renamingDecorator(newDirectExecutorService(), Suppliers.ofInstance("FooBar")); in testThreadRenaming()
/external/guava/guava-tests/test/com/google/common/util/concurrent/
DCallablesTest.java92 final Supplier<String> newName = Suppliers.ofInstance("MyCrazyThreadName"); in testRenaming()
108 final Supplier<String> newName = Suppliers.ofInstance("MyCrazyThreadName"); in testRenaming_exceptionalReturn()
143 Supplier<String> newName = Suppliers.ofInstance("MyCrazyThreadName"); in testRenaming_noPermissions()
DMoreExecutorsTest.java646 renamingDecorator(newDirectExecutorService(), Suppliers.ofInstance("FooBar")); in testThreadRenaming()
/external/guava/android/guava-tests/test/com/google/common/cache/
DCacheBuilderSpecTest.java473 builder.weigher(constantWeigher(42)).build(CacheLoader.from(Suppliers.ofInstance(null))); in testMaximumWeight_withWeigher()
479 builder.build(CacheLoader.from(Suppliers.ofInstance(null))); in testMaximumWeight_withoutWeigher()
487 builder.weigher(constantWeigher(42)).build(CacheLoader.from(Suppliers.ofInstance(null))); in testMaximumSize_withWeigher()
492 builder.build(CacheLoader.from(Suppliers.ofInstance(null))); in testMaximumSize_withoutWeigher()
502 builder.build(CacheLoader.from(Suppliers.ofInstance(value))); in testDisableCaching()
/external/guava/guava-tests/test/com/google/common/cache/
DCacheBuilderSpecTest.java473 builder.weigher(constantWeigher(42)).build(CacheLoader.from(Suppliers.ofInstance(null))); in testMaximumWeight_withWeigher()
479 builder.build(CacheLoader.from(Suppliers.ofInstance(null))); in testMaximumWeight_withoutWeigher()
487 builder.weigher(constantWeigher(42)).build(CacheLoader.from(Suppliers.ofInstance(null))); in testMaximumSize_withWeigher()
492 builder.build(CacheLoader.from(Suppliers.ofInstance(null))); in testMaximumSize_withoutWeigher()
502 builder.build(CacheLoader.from(Suppliers.ofInstance(value))); in testDisableCaching()
/external/guava/android/guava/src/com/google/common/base/
DSuppliers.java267 public static <T> Supplier<T> ofInstance(@NullableDecl T instance) { in ofInstance() method in Suppliers
/external/guava/guava/src/com/google/common/base/
DSuppliers.java267 public static <T> Supplier<T> ofInstance(@Nullable T instance) { in ofInstance() method in Suppliers
/external/turbine/java/com/google/turbine/processing/
DTurbineFiler.java189 return new BytesFileObject(path, Suppliers.ofInstance(generated)); in getResource()
/external/guava/android/guava/src/com/google/common/cache/
DCacheBuilder.java166 Suppliers.ofInstance(
/external/guava/guava/src/com/google/common/cache/
DCacheBuilder.java165 Suppliers.ofInstance(