Home
last modified time | relevance | path

Searched refs:T (Results 1 – 25 of 114) sorted by relevance

12345

/tools/tradefederation/core/common_util/com/android/tradefed/util/
DConditionPriorityBlockingQueue.java41 public class ConditionPriorityBlockingQueue<T> implements Iterable<T> {
48 public static interface IMatcher<T> {
55 boolean matches(T element); in matches()
64 public static class AlwaysMatch<T> implements IMatcher<T> {
70 public boolean matches(T element) { in matches()
75 private static class ConditionMatcherPair<T> {
76 private final IMatcher<T> mMatcher;
79 ConditionMatcherPair(IMatcher<T> m, Condition c) { in ConditionMatcherPair()
86 private final List<T> mList;
94 private final List<ConditionMatcherPair<T>> mWaitingMatcherList;
[all …]
DArrayUtil.java66 public static <T> List<T> list(T... inputAry) { in list()
67 List<T> retList = new ArrayList<T>(inputAry.length); in list()
68 for (T item : inputAry) { in list()
/tools/tradefederation/core/common_util/com/android/tradefed/invoker/tracing/
DTracePropagatingExecutorService.java58 public <T> Future<T> submit(Callable<T> task) { in submit()
63 public <T> Future<T> submit(Runnable task, T result) { in submit()
73 public <T> List<Future<T>> invokeAll(Collection<? extends Callable<T>> tasks) in invokeAll()
79 public <T> List<Future<T>> invokeAll( in invokeAll()
80 Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) in invokeAll()
86 public <T> T invokeAny(Collection<? extends Callable<T>> tasks) in invokeAny()
92 public <T> T invokeAny(Collection<? extends Callable<T>> tasks, long timeout, TimeUnit unit) in invokeAny()
131 private <T> Callable<T> wrapTask(Callable<T> task) { in wrapTask()
156 protected <T> Collection<? extends Callable<T>> wrapTasks(
157 Collection<? extends Callable<T>> tasks) {
[all …]
/tools/dexter/slicer/export/slicer/
Dhash_table.h47 template<class Key, class T, class Hash>
59 T* value = nullptr;
66 bool Insert(T* value);
67 T* Lookup(const Key& key, uint32_t hash_value) const;
93 void Insert(T* value);
97 T* Lookup(const Key& key) const;
107 template<class Key, class T, class Hash>
108 HashTable<Key, T, Hash>::Partition::Partition(Index size, const Hash& hasher) in Partition()
125 template<class Key, class T, class Hash>
126 bool HashTable<Key, T, Hash>::Partition::Insert(T* value) { in Insert()
[all …]
Dintrusive_list.h28 template <class T>
32 explicit Iterator(T* p) : p_(p) {} in Iterator()
37 T* operator*() const {
67 T* p_;
77 void push_back(T* p) { in push_back()
81 Iterator insert(Iterator it, T* p) { in insert()
85 Iterator InsertBefore(T* pos, T* p) { in InsertBefore()
103 Iterator InsertAfter(T* pos, T* p) { in InsertAfter()
116 void Remove(T* pos) { in Remove()
137 T* begin_ = &end_sentinel_;
[all …]
Dbuffer.h74 template <class T>
75 T* ptr(size_t offset) { in ptr()
76 SLICER_CHECK_LE(offset + sizeof(T), size_); in ptr()
77 return reinterpret_cast<T*>(buff_ + offset); in ptr()
107 template <class T>
108 size_t Push(const ArrayView<T>& a) { in Push()
109 return Push(a.data(), a.size() * sizeof(T)); in Push()
112 template <class T>
113 size_t Push(const std::vector<T>& v) { in Push()
114 return Push(v.data(), v.size() * sizeof(T)); in Push()
[all …]
Darrayview.h26 template <class T>
34 ArrayView(T* ptr, size_t count) : begin_(ptr), end_(ptr + count) {} in ArrayView()
36 T* begin() const { return begin_; } in begin()
37 T* end() const { return end_; } in end()
39 T* data() const { return begin_; } in data()
41 T& operator[](size_t i) const {
50 T* begin_ = nullptr;
51 T* end_ = nullptr;
Dreader.h108 template <class T>
109 const T* ptr(int offset) const { in ptr()
110 SLICER_CHECK_GE(offset, 0 && offset + sizeof(T) <= size_); in ptr()
111 return reinterpret_cast<const T*>(image_ + offset); in ptr()
116 template <class T>
117 const T* dataPtr(int offset) const { in dataPtr()
118 SLICER_CHECK_GE(offset, header_->data_off && offset + sizeof(T) <= size_); in dataPtr()
119 return reinterpret_cast<const T*>(image_ + offset); in dataPtr()
123 template <class T>
124 slicer::ArrayView<const T> section(int offset, int count) const { in section()
[all …]
Dscopeguard.h38 template<class T>
42 explicit ScopeGuard(T closure) : in ScopeGuard()
59 T closure_;
63 template<class T>
64 ScopeGuard<T> operator<<(T closure)
66 return ScopeGuard<T>(std::move(closure));
Dcode_ir.h46 template <class T>
47 using own = std::unique_ptr<T>;
265 template<class T>
266 inline T* CastOperand(Operand* op) { in CastOperand()
268 T* operand = dynamic_cast<T*>(op); in CastOperand()
274 T* converted = nullptr; in CastOperand()
275 bool Visit(T* val) override { in CastOperand()
336 template<class T>
337 T* CastOperand(int index) const { in CastOperand()
338 return detail::CastOperand<T>(operands[index]); in CastOperand()
[all …]
/tools/metalava/metalava-model/src/main/java/com/android/tools/metalava/model/type/
DTypeItemFactory.kt47 interface TypeItemFactory<in T, F : TypeItemFactory<T, F>> { in <lambda>()
65 fun getBoundsType(underlyingType: T): BoundsTypeItem in <lambda>()
68 fun getExceptionType(underlyingType: T): ExceptionTypeItem in <lambda>()
74 fun getGeneralType(underlyingType: T): TypeItem in <lambda>()
80 fun getInterfaceType(underlyingType: T): ClassTypeItem in <lambda>()
83 fun getSuperClassType(underlyingType: T): ClassTypeItem in <lambda>()
107 underlyingType: T, in <lambda>()
132 underlyingParameterType: T, in <lambda>()
154 underlyingReturnType: T, in <lambda>()
256 abstract class DefaultTypeItemFactory<in T, F : DefaultTypeItemFactory<T, F>>(
[all …]
/tools/apksig/src/main/java/com/android/apksig/internal/asn1/
DAsn1BerParser.java60 public static <T> T parse(ByteBuffer encoded, Class<T> containerClass) in parse()
96 public static <T> List<T> parseImplicitSetOf(ByteBuffer encoded, Class<T> elementClass) in parseImplicitSetOf()
110 private static <T> T parse(BerDataValue container, Class<T> containerClass) in parse()
146 private static <T> T parseChoice(BerDataValue dataValue, Class<T> containerClass) in parseChoice()
175 T obj; in parseChoice()
195 private static <T> T parseSequence(BerDataValue container, Class<T> containerClass) in parseSequence()
200 private static <T> T parseSequence(BerDataValue container, Class<T> containerClass, in parseSequence()
221 T t; in parseSequence()
285 private static <T> List<T> parseSetOf(BerDataValue container, Class<T> elementClass) in parseSetOf()
287 List<T> result = new ArrayList<>(); in parseSetOf()
[all …]
/tools/apksig/src/test/java/com/android/apksig/util/
DDataSinkTestBase.java35 public abstract class DataSinkTestBase<T extends DataSink> {
39 protected abstract CloseableWithDataSink<T> createDataSink() throws IOException; in createDataSink()
44 protected abstract ByteBuffer getContents(T dataSink) throws IOException; in getContents()
48 try (CloseableWithDataSink<T> c = createDataSink()) { in testConsumeFromArray()
49 T sink = c.getDataSink(); in testConsumeFromArray()
76 try (CloseableWithDataSink<T> c = createDataSink()) { in testConsumeFromByteBuffer()
77 T sink = c.getDataSink(); in testConsumeFromByteBuffer()
119 private void assertContentsEquals(String expectedContents, T sink) throws IOException { in assertContentsEquals()
132 public static class CloseableWithDataSink<T extends DataSink> implements Closeable {
133 private final T mDataSink;
[all …]
/tools/trebuchet/core/common/src/main/kotlin/trebuchet/io/
DPipe.kt21 interface Producer<in T> {
22 fun add(data: T) in add()
26 interface Consumer<out T> { in add()
27 fun next(): T? in add()
30 class Pipe<T>(capacity: Int = 4) : Producer<T>, Consumer<T> {
31 private class Packet<out T>(val data: T?)
33 private val queue = ArrayBlockingQueue<Packet<T>>(capacity)
37 override fun add(data: T) { in add()
51 override fun next(): T? { in next()
/tools/metalava/metalava-model/src/main/java/com/android/tools/metalava/model/
DModelOptions.kt35 operator fun <T : Any> get(key: Key<T>): T { in get()
59 operator fun <T : Any> set(key: Key<T>, value: T) { in set()
82 class Key<T : Any>
86 internal val default: T,
87 internal val kClass: KClass<T>
102 inline fun <reified T : Any> of(name: String, default: T): Key<T> { in toString()
103 return Key(name, default, T::class) in toString()
/tools/apksig/src/main/java/com/android/apksig/
DKeyConfig.java31 public abstract <T> T match(Function<Jca, T> local, Function<Kms, T> kms); in match()
41 public <T> T match(Function<Jca, T> jca, Function<Kms, T> kms) { in match()
56 public <T> T match(Function<Jca, T> jca, Function<Kms, T> kms) { in match()
/tools/metalava/metalava/src/main/java/com/android/tools/metalava/cli/common/
DMetalavaOptions.kt256 internal inline fun <reified T : Enum<T>> ParameterHolder.enumOption( in enumOption()
259 noinline enumValueHelpGetter: (T) -> String, in enumOption()
260 noinline key: (T) -> String = { it.name.lowercase().replace("_", "-") }, in enumOption()
261 default: T,
262 ): OptionWithValues<T, T, T> {
264 val enumValues = enumValues<T>()
272 internal fun <T : Enum<T>> ParameterHolder.nonInlineEnumOption( in nonInlineEnumOption()
274 enumValues: Array<T>, in nonInlineEnumOption()
276 enumValueHelpGetter: (T) -> String, in nonInlineEnumOption()
277 key: (T) -> String, in nonInlineEnumOption()
[all …]
/tools/tradefederation/core/src/com/android/tradefed/util/
DRequestUtil.java41 public static <T> T requestWithBackoff( in requestWithBackoff()
42 Callable<T> requestMethod, in requestWithBackoff()
88 public static <T> T requestWithBackoff( in requestWithBackoff()
89 Callable<T> requestMethod, int minWaitMSec, int maxWaitMSec, int scalingFactor) { in requestWithBackoff()
100 public static <T> T requestWithBackoff(Callable<T> requestMethod) { in requestWithBackoff()
/tools/netsim/rust/cli/src/
Dbrowser.rs22 pub fn open<T: AsRef<OsStr>>(path: T) { in open() argument
28 pub fn open<T: AsRef<OsStr>>(path: T) { in open() argument
43 pub fn open<T: AsRef<OsStr>>(path: T) { in open() argument
55 pub fn open<T: AsRef<OsStr>>(path: T) { in open() argument
/tools/tradefederation/core/src/com/android/tradefed/cluster/
DClusterEventUploader.java27 public abstract class ClusterEventUploader<T extends IClusterEvent>
28 implements IClusterEventUploader<T> {
39 private Queue<T> mEventQueue = new ConcurrentLinkedQueue<T>();
67 public void postEvent(final T event) { in postEvent()
99 List<T> events = new ArrayList<T>(); in uploadEvents()
118 protected abstract void doUploadEvents(List<T> events) throws IOException; in doUploadEvents()
/tools/metalava/metalava-model/src/testFixtures/java/com/android/tools/metalava/model/junit4/
DCustomizableParameterizedRunner.kt185 override fun <T : Annotation> getAnnotation(annotationType: Class<T>): T? { in getAnnotation()
191 return UseParametersRunnerFactory(runnerFactoryClass) as T in getAnnotation()
204 override fun <T : Annotation> getAnnotation(annotationType: Class<T>): T? { in getAnnotation()
206 @Suppress("UNCHECKED_CAST") return Parameters(name = pattern) as T in getAnnotation()
257 operator fun <T, V> Field.getValue(thisRef: T, property: KProperty<*>): V { in getValue()
262 operator fun <T, V> Field.setValue(thisRef: T, property: KProperty<*>, value: V) { in setValue()
/tools/metalava/metalava-model-text/src/main/java/com/android/tools/metalava/model/text/
DFileFormat.kt175 private inline fun <T> effectiveValue(getter: FileFormat.() -> T?, default: T): T { in <lambda>()
858 inline fun <reified T : Enum<T>> enumFromString(value: String): T { in <lambda>()
859 val enumValues = enumValues<T>() in <lambda>()
867 fun <T : Enum<T>> nonInlineEnumFromString(enumValues: Array<T>, value: String): T { in <lambda>()
882 fun <T : Enum<T>> T.stringFromEnum(): String { in <lambda>()
940 fun <T> Array<T>.possibilitiesList(transform: (T) -> String): String { in possibilitiesList()
/tools/metalava/metalava-model-source/src/main/java/com/android/tools/metalava/model/source/utils/
DCommonSourceUtils.kt24 class LazyDelegate<T>(val defaultValueProvider: () -> T) : ReadWriteProperty<Item, T> {
25 private var currentValue: T? = null
27 override operator fun setValue(thisRef: Item, property: KProperty<*>, value: T) { in setValue()
31 override operator fun getValue(thisRef: Item, property: KProperty<*>): T { in getValue()
/tools/apkzlib/src/main/java/com/android/tools/build/apkzlib/zip/
DFileUseMapEntry.java36 class FileUseMapEntry<T> {
64 private final T store;
73 private FileUseMapEntry(long start, long end, @Nullable T store) { in FileUseMapEntry()
102 public static <T> FileUseMapEntry<T> makeUsed(long start, long end, @Nonnull T store) { in makeUsed()
150 T getStore() { in getStore()
/tools/apkzlib/src/main/java/com/android/tools/build/apkzlib/utils/
DCachedSupplier.java46 public class CachedSupplier<T> {
52 private T cached;
63 private final Supplier<T> supplier;
68 public CachedSupplier(@Nonnull Supplier<T> supplier) { in CachedSupplier()
79 public synchronized T get() { in get()
105 public synchronized void precomputed(T t) { in precomputed()

12345