Home
last modified time | relevance | path

Searched refs:supplier (Results 1 – 25 of 27) sorted by relevance

12

/external/guava/guava-tests/test/com/google/common/io/
DMultiReaderTest.java35 final InputSupplier<Reader> supplier = newReader(testString); in testOnlyOneOpen() local
43 return new FilterReader(supplier.getInput()) { in testOnlyOneOpen()
58 InputSupplier<Reader> supplier = newReader("a"); in testReady() local
59 Iterable<? extends InputSupplier<? extends Reader>> list = ImmutableList.of(supplier, supplier); in testReady()
71 InputSupplier<Reader> supplier = newReader(testString); in testSimple() local
73 Reader joinedReader = CharStreams.join(supplier, supplier).getInput(); in testSimple()
108 InputSupplier<Reader> supplier = newReader("a");
109 Iterable<? extends InputSupplier<? extends Reader>> list = ImmutableList.of(supplier, supplier);
DFileBackedOutputStreamTest.java82 InputSupplier<InputStream> supplier = out.getSupplier(); in testThreshold() local
90 ByteStreams.newInputStreamSupplier(data, 0, chunk1), supplier)); in testThreshold() local
105 assertTrue(Arrays.equals(data, ByteStreams.toByteArray(supplier))); in testThreshold()
132 InputSupplier<InputStream> supplier = out.getSupplier(); in testWriteErrorAfterClose() local
135 assertTrue(Arrays.equals(data, ByteStreams.toByteArray(supplier))); in testWriteErrorAfterClose()
146 assertTrue(Arrays.equals(data, ByteStreams.toByteArray(supplier))); in testWriteErrorAfterClose()
153 InputSupplier<InputStream> supplier = out.getSupplier(); in testReset() local
156 assertTrue(Arrays.equals(data, ByteStreams.toByteArray(supplier))); in testReset()
159 assertTrue(Arrays.equals(new byte[0], ByteStreams.toByteArray(supplier))); in testReset()
162 assertTrue(Arrays.equals(data, ByteStreams.toByteArray(supplier))); in testReset()
DMultiInputStreamTest.java49 final InputSupplier<InputStream> supplier = newByteSupplier(0, 50); in testOnlyOneOpen() local
57 return new FilterInputStream(supplier.getInput()) { in testOnlyOneOpen()
83 InputSupplier<InputStream> supplier = newByteSupplier(0, 10); in testReadSingleByte() local
85 InputSupplier<InputStream> joined = ByteStreams.join(supplier, supplier); in testReadSingleByte()
DByteStreamsTest.java750 InputSupplier<? extends InputStream> supplier
753 ByteStreams.slice(supplier, -1, 10);
759 ByteStreams.slice(supplier, 0, -1);
796 InputSupplier<? extends InputStream> supplier
800 ByteStreams.toByteArray(ByteStreams.slice(supplier, offset, length))));
/external/chromium_org/third_party/libaddressinput/src/cpp/src/
Dregion_data_builder.cc39 void BuildRegionTreeRecursively(PreloadSupplier* supplier, in BuildRegionTreeRecursively() argument
44 assert(supplier != NULL); in BuildRegionTreeRecursively()
51 const Rule* rule = supplier->GetRule(lookup_key); in BuildRegionTreeRecursively()
62 BuildRegionTreeRecursively(supplier, lookup_key, region, in BuildRegionTreeRecursively()
70 RegionData* BuildRegion(PreloadSupplier* supplier, in BuildRegion() argument
73 assert(supplier != NULL); in BuildRegion()
81 const Rule* const rule = supplier->GetRule(lookup_key); in BuildRegion()
85 BuildRegionTreeRecursively(supplier, lookup_key, region, in BuildRegion()
93 RegionDataBuilder::RegionDataBuilder(PreloadSupplier* supplier) in RegionDataBuilder() argument
94 : supplier_(supplier), in RegionDataBuilder()
Daddress_validator.cc22 AddressValidator::AddressValidator(Supplier* supplier) : supplier_(supplier) { in AddressValidator() argument
Daddress_normalizer.cc32 AddressNormalizer::AddressNormalizer(const PreloadSupplier* supplier) in AddressNormalizer() argument
33 : supplier_(supplier), in AddressNormalizer()
Dvalidation_task.cc64 void ValidationTask::Run(Supplier* supplier) const { in Run()
65 assert(supplier != NULL); in Run()
68 supplier->Supply(*lookup_key_, *supplied_); in Run()
Daddress_input_helper.cc98 AddressInputHelper::AddressInputHelper(PreloadSupplier* supplier) in AddressInputHelper() argument
99 : supplier_(supplier) { in AddressInputHelper()
Dvalidation_task.h48 void Run(Supplier* supplier) const;
/external/guava/guava/src/com/google/common/base/
DSuppliers.java50 Function<? super F, T> function, Supplier<F> supplier) { in compose() argument
52 Preconditions.checkNotNull(supplier); in compose()
53 return new SupplierComposition<F, T>(function, supplier); in compose()
59 final Supplier<F> supplier; field in Suppliers.SupplierComposition
61 SupplierComposition(Function<? super F, T> function, Supplier<F> supplier) { in SupplierComposition() argument
63 this.supplier = supplier; in SupplierComposition()
67 return function.apply(supplier.get()); in get()
DFunctions.java317 public static <T> Function<Object, T> forSupplier(Supplier<T> supplier) { in forSupplier() argument
318 return new SupplierFunction<T>(supplier); in forSupplier()
324 private final Supplier<T> supplier; field in Functions.SupplierFunction
326 private SupplierFunction(Supplier<T> supplier) { in SupplierFunction() argument
327 this.supplier = checkNotNull(supplier); in SupplierFunction()
331 return supplier.get(); in apply()
337 return this.supplier.equals(that.supplier); in equals()
343 return supplier.hashCode(); in hashCode()
347 return "forSupplier(" + supplier + ")"; in toString()
DOptional.java132 public abstract T or(Supplier<? extends T> supplier); in or() argument
223 @Override public T or(Supplier<? extends T> supplier) {
224 checkNotNull(supplier);
275 @Override public Object or(Supplier<?> supplier) {
276 return checkNotNull(supplier.get(),
/external/guava/guava/src/com/google/common/io/
DCharStreams.java235 InputSupplier<R> supplier) throws IOException {
236 return toStringBuilder(supplier).toString();
261 InputSupplier<R> supplier) throws IOException {
263 R r = supplier.getInput();
283 InputSupplier<R> supplier) throws IOException {
285 R r = supplier.getInput();
305 InputSupplier<R> supplier) throws IOException {
307 R r = supplier.getInput();
351 InputSupplier<R> supplier, LineProcessor<T> callback) throws IOException {
353 R r = supplier.getInput();
DByteStreams.java247 InputSupplier<? extends InputStream> supplier) throws IOException {
249 InputStream in = supplier.getInput();
572 public static long length(InputSupplier<? extends InputStream> supplier)
576 InputStream in = supplier.getInput();
701 public static <T> T readBytes(InputSupplier<? extends InputStream> supplier,
705 InputStream in = supplier.getInput();
731 public static long getChecksum(InputSupplier<? extends InputStream> supplier,
733 return readBytes(supplier, new ByteProcessor<Long>() {
759 public static byte[] getDigest(InputSupplier<? extends InputStream> supplier,
761 return readBytes(supplier, new ByteProcessor<byte[]>() {
[all …]
DFileBackedOutputStream.java45 private final InputSupplier<InputStream> supplier; field in FileBackedOutputStream
97 supplier = new InputSupplier<InputStream>() { in FileBackedOutputStream()
112 supplier = new InputSupplier<InputStream>() { in FileBackedOutputStream()
126 return supplier; in getSupplier()
/external/guava/guava-tests/test/com/google/common/base/
DSuppliersTest.java240 @Override public Supplier<Boolean> apply(Supplier<Boolean> supplier) { in testExpiringMemoizedSupplierThreadSafe()
242 supplier, Long.MAX_VALUE, TimeUnit.NANOSECONDS); in testExpiringMemoizedSupplierThreadSafe()
253 @Override public Supplier<Boolean> apply(Supplier<Boolean> supplier) { in testMemoizedSupplierThreadSafe()
254 return Suppliers.memoize(supplier); in testMemoizedSupplierThreadSafe()
271 final Supplier<Boolean> supplier = new Supplier<Boolean>() { in testSupplierThreadSafe() local
312 final Supplier<Boolean> memoizedSupplier = memoizer.apply(supplier); in testSupplierThreadSafe()
372 Supplier<Integer> supplier = Suppliers.ofInstance(14); in testSupplierFunction() local
376 assertEquals(14, (int) supplierFunction.apply(supplier)); in testSupplierFunction()
DFunctionsTest.java411 Supplier<Integer> supplier = new CountingSupplier(); in testForSupplier() local
412 Function<Object, Integer> function = Functions.forSupplier(supplier); in testForSupplier()
418 .addEqualityGroup(function, Functions.forSupplier(supplier)) in testForSupplier()
/external/junit/src/org/junit/experimental/theories/internal/
DAssignments.java86 ParameterSupplier supplier= getAnnotatedSupplier(unassigned); in getSupplier() local
87 if (supplier != null) in getSupplier()
88 return supplier; in getSupplier()
/external/guava/guava-gwt/src-super/com/google/common/cache/super/com/google/common/cache/
DCacheLoader.java102 public static <V> CacheLoader<Object, V> from(Supplier<V> supplier) { in from() argument
103 return new SupplierToCacheLoader<V>(supplier); in from()
/external/guava/guava/src/com/google/common/cache/
DCacheLoader.java129 public static <V> CacheLoader<Object, V> from(Supplier<V> supplier) { in from() argument
130 return new SupplierToCacheLoader<V>(supplier); in from()
/external/chromium_org/third_party/libaddressinput/src/cpp/include/libaddressinput/
Daddress_normalizer.h31 explicit AddressNormalizer(const PreloadSupplier* supplier);
Daddress_input_helper.h36 AddressInputHelper(PreloadSupplier* supplier);
Daddress_validator.h73 AddressValidator(Supplier* supplier);
Dregion_data_builder.h32 explicit RegionDataBuilder(PreloadSupplier* supplier);

12