Home
last modified time | relevance | path

Searched refs:Supplier (Results 1 – 25 of 184) sorted by relevance

12345678

/external/guava/guava/src/com/google/common/base/
DSuppliers.java45 public static <F, T> Supplier<T> compose(Function<? super F, T> function, Supplier<F> supplier) { in compose()
49 private static class SupplierComposition<F, T> implements Supplier<T>, Serializable {
51 final Supplier<F> supplier;
53 SupplierComposition(Function<? super F, T> function, Supplier<F> supplier) { in SupplierComposition()
101 public static <T> Supplier<T> memoize(Supplier<T> delegate) { in memoize()
112 static class MemoizingSupplier<T> implements Supplier<T>, Serializable {
113 final Supplier<T> delegate;
119 MemoizingSupplier(Supplier<T> delegate) { in MemoizingSupplier()
150 static class NonSerializableMemoizingSupplier<T> implements Supplier<T> {
151 volatile Supplier<T> delegate;
[all …]
/external/guava/android/guava/src/com/google/common/base/
DSuppliers.java45 public static <F, T> Supplier<T> compose(Function<? super F, T> function, Supplier<F> supplier) { in compose()
49 private static class SupplierComposition<F, T> implements Supplier<T>, Serializable {
51 final Supplier<F> supplier;
53 SupplierComposition(Function<? super F, T> function, Supplier<F> supplier) { in SupplierComposition()
101 public static <T> Supplier<T> memoize(Supplier<T> delegate) { in memoize()
112 static class MemoizingSupplier<T> implements Supplier<T>, Serializable {
113 final Supplier<T> delegate;
119 MemoizingSupplier(Supplier<T> delegate) { in MemoizingSupplier()
150 static class NonSerializableMemoizingSupplier<T> implements Supplier<T> {
151 volatile Supplier<T> delegate;
[all …]
/external/javaparser/javaparser-core/src/main/java/com/github/javaparser/utils/
DLog.java6 import java.util.function.Supplier;
21 public void info(Supplier<String> messageSupplier) { in info()
26 public void trace(Supplier<String> messageSupplier) { in trace()
31 public void error(Supplier<Throwable> throwableSupplier, Supplier<String> messageSupplier) { in error()
60 public void info(Supplier<String> messageSupplier) { in info()
64 public void trace(Supplier<String> messageSupplier) { in trace()
68 public void error(Supplier<Throwable> throwableSupplier, Supplier<String> messageSupplier) { in error()
74 void info(Supplier<String> message); in info()
76 void trace(Supplier<String> message); in trace()
81 void error(Supplier<Throwable> throwableSupplier, Supplier<String> messageSupplier); in error()
[all …]
/external/guava/guava-tests/test/com/google/common/base/
DSuppliersTest.java45 static class CountingSupplier implements Supplier<Integer> {
60 static class ThrowingSupplier implements Supplier<Integer> {
75 static void checkMemoize(CountingSupplier countingSupplier, Supplier<Integer> memoizedSupplier) { in checkMemoize()
96 Supplier<Integer> memoizedSupplier = Suppliers.memoize(countingSupplier); in memoizeTest()
106 Supplier<Integer> memoizedSupplier = Suppliers.memoize(countingSupplier); in memoize_redudantlyTest()
116 Supplier<Integer> memoizedSupplier = Suppliers.memoize(throwingSupplier); in memoizeExceptionThrownTest()
132 Supplier<Integer> memoizedSupplier = Suppliers.memoize(countingSupplier); in testMemoizeNonSerializable()
152 Supplier<Integer> memoizedSupplier = Suppliers.memoize(countingSupplier); in testMemoizeSerializable()
160 Supplier<Integer> copy = reserialize(memoizedSupplier); in testMemoizeSerializable()
169 Supplier<Integer> fiveSupplier = in testCompose()
[all …]
/external/guava/android/guava-tests/test/com/google/common/base/
DSuppliersTest.java45 static class CountingSupplier implements Supplier<Integer> {
60 static class ThrowingSupplier implements Supplier<Integer> {
75 static void checkMemoize(CountingSupplier countingSupplier, Supplier<Integer> memoizedSupplier) { in checkMemoize()
96 Supplier<Integer> memoizedSupplier = Suppliers.memoize(countingSupplier); in memoizeTest()
106 Supplier<Integer> memoizedSupplier = Suppliers.memoize(countingSupplier); in memoize_redudantlyTest()
116 Supplier<Integer> memoizedSupplier = Suppliers.memoize(throwingSupplier); in memoizeExceptionThrownTest()
132 Supplier<Integer> memoizedSupplier = Suppliers.memoize(countingSupplier); in testMemoizeNonSerializable()
152 Supplier<Integer> memoizedSupplier = Suppliers.memoize(countingSupplier); in testMemoizeSerializable()
160 Supplier<Integer> copy = reserialize(memoizedSupplier); in testMemoizeSerializable()
169 Supplier<Integer> fiveSupplier = in testCompose()
[all …]
/external/jimfs/jimfs/src/main/java/com/google/common/jimfs/
DFileFactory.java22 import com.google.common.base.Supplier;
75 private final Supplier<Directory> directorySupplier = new DirectorySupplier();
77 private final Supplier<RegularFile> regularFileSupplier = new RegularFileSupplier();
80 public Supplier<Directory> directoryCreator() { in directoryCreator()
85 public Supplier<RegularFile> regularFileCreator() { in regularFileCreator()
90 public Supplier<SymbolicLink> symbolicLinkCreator(JimfsPath target) { in symbolicLinkCreator()
94 private final class DirectorySupplier implements Supplier<Directory> {
101 private final class RegularFileSupplier implements Supplier<RegularFile> {
108 private final class SymbolicLinkSupplier implements Supplier<SymbolicLink> {
/external/turbine/java/com/google/turbine/binder/bytecode/
DBytecodeBoundClass.java22 import com.google.common.base.Supplier;
76 private final Supplier<ClassFile> classFile;
81 Supplier<byte[]> bytes, in BytecodeBoundClass()
89 new Supplier<ClassFile>() { in BytecodeBoundClass()
103 private final Supplier<TurbineTyKind> kind =
105 new Supplier<TurbineTyKind>() {
127 private final Supplier<ClassSymbol> owner =
129 new Supplier<ClassSymbol>() {
147 private final Supplier<ImmutableMap<String, ClassSymbol>> children =
149 new Supplier<ImmutableMap<String, ClassSymbol>>() {
[all …]
/external/turbine/java/com/google/turbine/binder/lookup/
DMemberImportIndex.java21 import com.google.common.base.Supplier;
38 private final Map<String, Supplier<ClassSymbol>> cache = new LinkedHashMap<>();
40 private final ImmutableList<Supplier<ClassSymbol>> classes;
47 ImmutableList.Builder<Supplier<ClassSymbol>> packageScopes = ImmutableList.builder(); in MemberImportIndex()
55 new Supplier<ClassSymbol>() { in MemberImportIndex()
73 new Supplier<ClassSymbol>() { in MemberImportIndex()
111 Supplier<ClassSymbol> cachedResult = cache.get(simpleName); in singleMemberImport()
124 private final Iterator<Supplier<ClassSymbol>> it;
126 public WildcardSymbols(Iterator<Supplier<ClassSymbol>> it) { in WildcardSymbols()
DImportIndex.java22 import com.google.common.base.Supplier;
50 private final Map<String, Supplier<ImportScope>> thunks;
52 public ImportIndex(TurbineLogWithSource log, ImmutableMap<String, Supplier<ImportScope>> thunks) { in ImportIndex()
62 Map<String, Supplier<ImportScope>> thunks = new HashMap<>(); in create()
70 new Supplier<ImportScope>() { in create()
87 new Supplier<ImportScope>() { in create()
168 Supplier<ImportScope> thunk = thunks.get(lookup.first().value());
/external/guava/guava/src/com/google/common/util/concurrent/
DStriped.java22 import com.google.common.base.Supplier;
194 static <L> Striped<L> custom(int stripes, Supplier<L> supplier) { in custom()
208 new Supplier<Lock>() { in lock()
226 new Supplier<Lock>() {
234 private static <L> Striped<L> lazy(int stripes, Supplier<L> supplier) {
251 new Supplier<Semaphore>() {
270 new Supplier<Semaphore>() {
300 private static final Supplier<ReadWriteLock> READ_WRITE_LOCK_SUPPLIER =
301 new Supplier<ReadWriteLock>() {
308 private static final Supplier<ReadWriteLock> WEAK_SAFE_READ_WRITE_LOCK_SUPPLIER =
[all …]
/external/guava/android/guava/src/com/google/common/util/concurrent/
DStriped.java22 import com.google.common.base.Supplier;
194 static <L> Striped<L> custom(int stripes, Supplier<L> supplier) { in custom()
208 new Supplier<Lock>() { in lock()
226 new Supplier<Lock>() {
234 private static <L> Striped<L> lazy(int stripes, Supplier<L> supplier) {
251 new Supplier<Semaphore>() {
270 new Supplier<Semaphore>() {
300 private static final Supplier<ReadWriteLock> READ_WRITE_LOCK_SUPPLIER =
301 new Supplier<ReadWriteLock>() {
308 private static final Supplier<ReadWriteLock> WEAK_SAFE_READ_WRITE_LOCK_SUPPLIER =
[all …]
/external/guava/guava/src/com/google/common/hash/
DLongAddables.java17 import com.google.common.base.Supplier;
26 private static final Supplier<LongAddable> SUPPLIER;
29 Supplier<LongAddable> supplier;
33 new Supplier<LongAddable>() {
41 new Supplier<LongAddable>() {
/external/guava/android/guava/src/com/google/common/hash/
DLongAddables.java17 import com.google.common.base.Supplier;
26 private static final Supplier<LongAddable> SUPPLIER;
29 Supplier<LongAddable> supplier;
33 new Supplier<LongAddable>() {
41 new Supplier<LongAddable>() {
/external/guava/guava/src/com/google/common/cache/
DLongAddables.java18 import com.google.common.base.Supplier;
28 private static final Supplier<LongAddable> SUPPLIER;
31 Supplier<LongAddable> supplier;
35 new Supplier<LongAddable>() {
43 new Supplier<LongAddable>() {
/external/guava/android/guava/src/com/google/common/cache/
DLongAddables.java18 import com.google.common.base.Supplier;
28 private static final Supplier<LongAddable> SUPPLIER;
31 Supplier<LongAddable> supplier;
35 new Supplier<LongAddable>() {
43 new Supplier<LongAddable>() {
/external/turbine/javatests/com/google/turbine/lower/testdata/
Dsupplierfunction.test1 === test/Supplier.java ===
4 public interface Supplier<T> {
19 public static <T> Function<Supplier<T>, T> supplierFunction() {
23 private interface SupplierFunction<T> extends Function<Supplier<T>, T> {}
29 @Override public Object apply(Supplier<Object> input) {
/external/javaparser/javaparser-core-testing/src/test/java/com/github/javaparser/utils/
DLogTest.java7 import java.util.function.Supplier;
16 public void info(Supplier<String> messageSupplier) { in info()
21 public void trace(Supplier<String> messageSupplier) { in trace()
26 public void error(Supplier<Throwable> throwableSupplier, Supplier<String> messageSupplier) { in error()
/external/mockito/src/main/java/org/mockito/internal/runners/
DRunnerFactory.java14 import org.mockito.internal.util.Supplier;
29 return create(klass, new Supplier<MockitoTestListener>() { in create()
40 return create(klass, new Supplier<MockitoTestListener>() {
53 return create(klass, new Supplier<MockitoTestListener>() {
63 …public InternalRunner create(Class<?> klass, Supplier<MockitoTestListener> listenerSupplier) throw…
/external/guava/guava/src/com/google/common/collect/
DMultimapBuilder.java23 import com.google.common.base.Supplier;
183 private static final class ArrayListSupplier<V> implements Supplier<List<V>>, Serializable {
196 private enum LinkedListSupplier implements Supplier<List<Object>> {
199 public static <V> Supplier<List<V>> instance() {
202 Supplier<List<V>> result = (Supplier) INSTANCE;
212 private static final class HashSetSupplier<V> implements Supplier<Set<V>>, Serializable {
225 private static final class LinkedHashSetSupplier<V> implements Supplier<Set<V>>, Serializable {
238 private static final class TreeSetSupplier<V> implements Supplier<SortedSet<V>>, Serializable {
252 implements Supplier<Set<V>>, Serializable {
393 Supplier<Set<V>> factory = (Supplier) new EnumSetSupplier<V0>(valueClass);
/external/guava/android/guava/src/com/google/common/collect/
DMultimapBuilder.java23 import com.google.common.base.Supplier;
183 private static final class ArrayListSupplier<V> implements Supplier<List<V>>, Serializable {
196 private enum LinkedListSupplier implements Supplier<List<Object>> {
199 public static <V> Supplier<List<V>> instance() {
202 Supplier<List<V>> result = (Supplier) INSTANCE;
212 private static final class HashSetSupplier<V> implements Supplier<Set<V>>, Serializable {
225 private static final class LinkedHashSetSupplier<V> implements Supplier<Set<V>>, Serializable {
238 private static final class TreeSetSupplier<V> implements Supplier<SortedSet<V>>, Serializable {
252 implements Supplier<Set<V>>, Serializable {
393 Supplier<Set<V>> factory = (Supplier) new EnumSetSupplier<V0>(valueClass);
/external/turbine/java/com/google/turbine/processing/
DTurbineElement.java23 import com.google.common.base.Supplier;
98 private final Supplier<ImmutableList<AnnotationMirror>> annotationMirrors;
100 protected <T> Supplier<T> memoize(Supplier<T> supplier) { in memoize()
108 new Supplier<ImmutableList<AnnotationMirror>>() { in TurbineElement()
192 private final Supplier<TypeBoundClass> info;
199 new Supplier<TypeBoundClass>() { in TurbineTypeElement()
226 private final Supplier<TurbineName> qualifiedName =
228 new Supplier<TurbineName>() {
252 private final Supplier<TypeMirror> superclass =
254 new Supplier<TypeMirror>() {
[all …]
DTurbineAnnotationMirror.java23 import com.google.common.base.Supplier;
76 private final Supplier<DeclaredType> type;
77 private final Supplier<ImmutableMap<String, MethodInfo>> elements;
78 private final Supplier<ImmutableMap<ExecutableElement, AnnotationValue>> elementValues;
79 private final Supplier<ImmutableMap<ExecutableElement, AnnotationValue>>
87 new Supplier<DeclaredType>() { in TurbineAnnotationMirror()
99 new Supplier<ImmutableMap<String, MethodInfo>>() { in TurbineAnnotationMirror()
112 new Supplier<ImmutableMap<ExecutableElement, AnnotationValue>>() { in TurbineAnnotationMirror()
127 new Supplier<ImmutableMap<ExecutableElement, AnnotationValue>>() { in TurbineAnnotationMirror()
200 private final Supplier<ImmutableList<AnnotationValue>> elements;
[all …]
/external/dagger2/java/dagger/internal/codegen/writing/
DInstanceFactoryCreationExpression.java24 import java.util.function.Supplier;
33 private final Supplier<CodeBlock> instanceExpression;
35 InstanceFactoryCreationExpression(Supplier<CodeBlock> instanceExpression) { in InstanceFactoryCreationExpression()
39 InstanceFactoryCreationExpression(boolean nullable, Supplier<CodeBlock> instanceExpression) { in InstanceFactoryCreationExpression()
/external/guava/android/guava-tests/test/com/google/common/util/concurrent/
DStripedTest.java22 import com.google.common.base.Supplier;
55 new Supplier<Lock>() { in strongImplementations()
63 new Supplier<Lock>() { in strongImplementations()
73 private static final Supplier<ReadWriteLock> READ_WRITE_LOCK_SUPPLIER =
74 new Supplier<ReadWriteLock>() {
81 private static final Supplier<Lock> LOCK_SUPPLER =
82 new Supplier<Lock>() {
89 private static final Supplier<Semaphore> SEMAPHORE_SUPPLER =
90 new Supplier<Semaphore>() {
/external/guava/guava-tests/test/com/google/common/util/concurrent/
DStripedTest.java22 import com.google.common.base.Supplier;
55 new Supplier<Lock>() { in strongImplementations()
63 new Supplier<Lock>() { in strongImplementations()
73 private static final Supplier<ReadWriteLock> READ_WRITE_LOCK_SUPPLIER =
74 new Supplier<ReadWriteLock>() {
81 private static final Supplier<Lock> LOCK_SUPPLER =
82 new Supplier<Lock>() {
89 private static final Supplier<Semaphore> SEMAPHORE_SUPPLER =
90 new Supplier<Semaphore>() {

12345678