Home
last modified time | relevance | path

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

12345678910>>...13

/cts/tests/camera/utils/src/android/hardware/camera2/cts/helpers/
DCameraErrorCollector.java98 public <T> void checkThat(final T value, final Matcher<T> matcher) { in checkThat()
109 public <T> void checkThat(final String reason, final T value, final Matcher<T> matcher) { in checkThat()
154 public <T> boolean expectEquals(String msg, T expected, T actual) { in expectEquals()
169 public <T> boolean expectEquals(String msg, T expected, T actual, boolean mpc) { in expectEquals()
195 public <T> boolean expectNotEquals(String msg, T expected, T actual) { in expectNotEquals()
215 public <T> boolean expectEquals(String msg, T[] expected, T[] actual) { in expectEquals()
240 public <T> boolean expectNotEquals(String msg, T[] expected, T[] actual) { in expectNotEquals()
263 public <T> boolean expectContainsAll(String msg, Collection<T> values, Collection<T> expected) { in expectContainsAll()
267 List<T> missing = expected.stream() in expectContainsAll()
294 public <T extends Comparable<? super T>> boolean expectGreater(String msg, T expected, in expectGreater()
[all …]
DInMatcher.java30 public class InMatcher<T> extends BaseMatcher<T> {
32 protected Collection<T> mValues;
34 public InMatcher(Collection<T> values) { in InMatcher()
39 public InMatcher(T... values) { in InMatcher()
47 T obj = (T) o; in matches()
48 for (T elem : mValues) { in matches()
62 public static <T> Matcher<T> in(T... operand) { in in()
63 return new InMatcher<T>(operand); in in()
67 public static <T> Matcher<T> in(Collection<T> operand) { in in()
68 return new InMatcher<T>(operand); in in()
DPreconditions.java60 public static <T> T checkEquals(String argName, T arg, in checkEquals()
61 String expectedName, T expectedValue) { in checkEquals()
85 public static <T> T checkNotNull(String argName, T arg) { in checkNotNull()
105 public static <T> T checkNotNull(T arg) { in checkNotNull()
138 public static <T> Collection<T> checkCollectionElementsNotNull(final Collection<T> value, in checkCollectionElementsNotNull()
145 for (T elem : value) { in checkCollectionElementsNotNull()
167 public static <T> Collection<T> checkCollectionNotEmpty(final Collection<T> value, in checkCollectionNotEmpty()
DAssertHelpers.java131 public static <T> void assertArrayContains(String message, T[] actual, T checkVals) { in assertArrayContains()
155 public static <T> T assertArrayContainsAnyOf(String message, T[] actual, T[] checkVals) { in assertArrayContainsAnyOf()
179 public static <T> T assertCollectionContainsAnyOf(String message, Collection<T> actual, in assertCollectionContainsAnyOf()
180 Collection<T> checkVals) { in assertCollectionContainsAnyOf()
182 T selected = null; in assertCollectionContainsAnyOf()
183 for (T check : checkVals) { in assertCollectionContainsAnyOf()
199 private static <T> List<T> buildList(T[] array) { in buildList()
200 return new ArrayList<T>(Arrays.asList(array)); in buildList()
211 private static <T> String formatCollection(Collection<T> collection, int maxLen) { in formatCollection()
216 for (T elem : collection) { in formatCollection()
/cts/common/device-side/bedstead/harrier/src/main/java/com/android/bedstead/harrier/
DBedsteadServiceLocator.kt38 fun <T : Any> get(clazz: KClass<T>): T { in <lambda>()
41 existingInstance as T in <lambda>()
52 inline fun <reified T : Any> get(): T = get(T::class) in <lambda>()
58 inline operator fun <reified T : Any> getValue(thisRef: Any, property: KProperty<*>): T { in <lambda>()
59 return get<T>() in <lambda>()
65 fun <T : Any> get(clazz: Class<T>): T = get(clazz.kotlin) in <lambda>()
67 private fun <T : Any> createDependency(clazz: KClass<T>): T { in <lambda>()
77 private fun <T : Any> createDependencyByReflection(clazz: Class<T>): T { in <lambda>()
119 inline fun <reified T : Any> getAllDependenciesOfType(): List<T> { in <lambda>()
120 return getAllDependencies().filterIsInstance<T>() in <lambda>()
[all …]
/cts/tests/framework/base/windowmanager/jetpack/src/android/server/wm/jetpack/utils/
DCondition.java51 public class Condition<T> {
67 private Supplier<T> mResultSupplier;
69 private Predicate<T> mResultValidator;
70 private Consumer<T> mOnFailure;
72 private T mLastResult;
73 private T mValidatedResult;
95 public Condition<T> setResultSupplier(Supplier<T> supplier) { in setResultSupplier()
101 public Condition<T> setResultValidator(Predicate<T> validator) { in setResultValidator()
110 public Condition<T> setReturnLastResult(boolean returnLastResult) { in setReturnLastResult()
119 public Condition<T> setOnFailure(Consumer<T> onFailure) { in setOnFailure()
[all …]
/cts/tests/framework/base/windowmanager/util/src/android/server/wm/
DCondition.java51 public class Condition<T> {
67 private Supplier<T> mResultSupplier;
69 private Predicate<T> mResultValidator;
70 private Consumer<T> mOnFailure;
72 private T mLastResult;
73 private T mValidatedResult;
95 public Condition<T> setResultSupplier(Supplier<T> supplier) { in setResultSupplier()
101 public Condition<T> setResultValidator(Predicate<T> validator) { in setResultValidator()
110 public Condition<T> setReturnLastResult(boolean returnLastResult) { in setReturnLastResult()
119 public Condition<T> setOnFailure(Consumer<T> onFailure) { in setOnFailure()
[all …]
DWindowManagerTestBase.java43 public static <T extends FocusableActivity> T startActivity(Class<T> cls) { in startActivity()
47 protected static <T extends FocusableActivity> T startActivity(Class<T> cls, int displayId) { in startActivity()
51 protected static <T extends FocusableActivity> T startActivity( in startActivity()
52 Class<T> cls, int displayId, boolean hasFocus) { in startActivity()
56 public static <T extends FocusableActivity> T startActivityInWindowingMode( in startActivityInWindowingMode()
57 Class<T> cls, int windowingMode) { in startActivityInWindowingMode()
61 protected static <T extends FocusableActivity> T startActivityInWindowingModeFullScreen( in startActivityInWindowingModeFullScreen()
62 Class<T> cls) { in startActivityInWindowingModeFullScreen()
66 public static <T extends FocusableActivity> T startActivity( in startActivity()
67 Class<T> cls, int displayId, boolean hasFocus, int windowingMode) { in startActivity()
[all …]
/cts/apps/CtsVerifier/include/colorchecker/
Dvec2.h23 template <class T>
26 Vec2(T inputX, T inputY) { in Vec2()
33 inline Vec2<T> operator+ (const Vec2<T> &param) const {
34 Vec2<T> temp(mX + param.x(), mY + param.y());
38 inline Vec2<T> operator- (const Vec2<T> &param) const {
39 Vec2<T> temp(mX - param.x(), mY - param.y());
59 inline T x() const { return mX; } in x()
60 inline T y() const { return mY; } in y()
62 inline void set(const T inputX, const T inputY) { in set()
68 T mX;
[all …]
Dvec3.h24 template <class T>
27 Vec3(T inputRed, T inputGreen, T inputBlue) { in Vec3()
36 inline Vec3<T> operator+ (const Vec3<U> &param) const {
37 Vec3<T> temp(mRed + param.r(), mGreen + param.g(), mBlue + param.b());
41 inline Vec3<T> operator- (const Vec3<T> &param) const {
42 Vec3<T> temp(mRed - param.r(), mGreen - param.g(), mBlue - param.b());
46 inline Vec3<T> operator* (const int param) const {
47 Vec3<T> temp(mRed * param, mGreen * param, mBlue * param);
98 inline T r() const { return mRed; } in r()
99 inline T g() const { return mGreen; } in g()
[all …]
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/
DShellIdentityUtils.java37 public interface ShellPermissionMethodHelper<T, U> {
44 T callMethod(U targetObject); in callMethod()
66 public interface ShellPermissionThrowableMethodHelper<T, U, E extends Throwable> {
73 T callMethod(U targetObject) throws E; in callMethod()
97 public static <T, U> T invokeMethodWithShellPermissions(U targetObject, in invokeMethodWithShellPermissions()
98 ShellPermissionMethodHelper<T, U> methodHelper) { in invokeMethodWithShellPermissions() argument
125 public static <T, U> T invokeMethodWithShellPermissions(U targetObject, in invokeMethodWithShellPermissions()
126 ShellPermissionMethodHelper<T, U> methodHelper, String... permissions) { in invokeMethodWithShellPermissions() argument
138 public interface TriFunction<T, U, V, R> {
139 R apply(T t, U u, V v); in apply()
[all …]
/cts/tests/tests/rscpp/librscpptest/
Dvector.rscript3 #define MAKE_TEST(T) \
4 void vector_test_##T(T t) {} \
5 void vector_test_##T##2(T##2 t) {} \
6 void vector_test_##T##3(T##3 t) {} \
7 void vector_test_##T##4(T##4 t) {} \
/cts/libs/webkit-shared/src/android/webkit/cts/
DExceptionWrapper.java41 public static <T> T wrap(WrappedTypedCall<T> c) { in wrap()
56 public static <T> T unwrap(UnwrappedTypedCall<T> c) { in unwrap()
80 interface WrappedTypedCall<T> {
81 T wrap() throws Exception; in wrap()
88 interface UnwrappedTypedCall<T> {
89 T unwrap() throws RemoteException; in unwrap()
/cts/tests/tests/util/src/android/util/cts/
DRangeTest.java125 private static <T extends Comparable<? super T>> void verifyInRange(Range<T> object, T needle) { in verifyInRange()
129 private static <T extends Comparable<? super T>> void verifyOutOfRange(Range<T> object, in verifyOutOfRange()
130 T needle) { in verifyOutOfRange()
134 private static <T extends Comparable<? super T>> void verifyUpper(Range<T> object, T expected) { in verifyUpper()
138 private static <T extends Comparable<? super T>> void verifyLower(Range<T> object, T expected) { in verifyLower()
142 private static <T, T2> void verifyAction(String action, T object, T2 expected, in verifyAction()
148 private static <T, T2> void verifyAction(String action, T object, T2 needle, boolean expected, in verifyAction()
155 private static <T extends Comparable<? super T>> void verifyHashCodeEquals( in verifyHashCodeEquals()
156 Range<T> left, Range<T> right) { in verifyHashCodeEquals()
/cts/tests/framework/base/windowmanager/util/src/android/server/wm/settings/
DSettingsSession.java65 public class SettingsSession<T> implements AutoCloseable {
70 public interface SettingsGetter<T> {
71 T get(ContentResolver cr, String key) throws SettingNotFoundException; in get()
75 public interface SettingsSetter<T> {
76 void set(ContentResolver cr, String key, T value); in set()
87 protected final T mInitialValue;
88 private final SettingsGetter<T> mGetter;
89 private final SettingsSetter<T> mSetter;
91 public SettingsSession(final Uri uri, final SettingsGetter<T> getter, in SettingsSession()
92 final SettingsSetter<T> setter) { in SettingsSession()
[all …]
/cts/hostsidetests/classloaders/useslibrary/src/android/classloaders/cts/
DBaseInstallMultiple.java43 public class BaseInstallMultiple<T extends BaseInstallMultiple<?>> {
59 T addArg(String arg) { in addArg()
61 return (T) this; in addArg()
64 T addApk(String apk) throws FileNotFoundException { in addApk()
67 return (T) this; in addApk()
70 T inheritFrom(String packageName) { in inheritFrom()
73 return (T) this; in inheritFrom()
76 T useNaturalAbi() { in useNaturalAbi()
78 return (T) this; in useNaturalAbi()
81 T allowTest() { in allowTest()
[all …]
/cts/hostsidetests/classloaders/splits/src/android/classloaders/cts/
DBaseInstallMultiple.java43 public class BaseInstallMultiple<T extends BaseInstallMultiple<?>> {
59 T addArg(String arg) { in addArg()
61 return (T) this; in addArg()
64 T addApk(String apk) throws FileNotFoundException { in addApk()
67 return (T) this; in addApk()
70 T inheritFrom(String packageName) { in inheritFrom()
73 return (T) this; in inheritFrom()
76 T useNaturalAbi() { in useNaturalAbi()
78 return (T) this; in useNaturalAbi()
81 T allowTest() { in allowTest()
[all …]
/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/utils/
DParcelTest.java37 public static <T extends Parcelable> void assertParcelsCorrectly(Class<T> cls, T obj) { in assertParcelsCorrectly()
38 T newInstance = parcelAndUnparcel(cls, obj); in assertParcelsCorrectly()
48 public static <T extends Parcelable> T parcelAndUnparcel(Class<T> cls, T obj) { in parcelAndUnparcel()
56 T newInstance = parcel.readParcelable(ParcelTest.class.getClassLoader()); in parcelAndUnparcel()
/cts/libs/deviceutillegacy/src/android/webkit/cts/
DWebkitUtils.java60 public static <T> Future<T> onMainThread(final Callable<T> callable) { in onMainThread()
61 final SettableFuture<T> future = SettableFuture.create(); in onMainThread()
95 public static <T> T onMainThreadSync(final Callable<T> callable) { in onMainThreadSync()
141 public static <T> T waitForFuture(Future<T> future) { in waitForFuture()
173 public static <T> T waitForNextQueueElement(BlockingQueue<T> queue) { in waitForNextQueueElement()
175 T value = queue.poll(TEST_TIMEOUT_MS, TimeUnit.MILLISECONDS); in waitForNextQueueElement()
/cts/tests/mediapc/common/src/android/mediapc/cts/common/
DRequiredMeasurement.java34 public abstract class RequiredMeasurement<T> {
37 private T measuredValue; // Note this is not part of the equals calculations
40 public static <T> Builder<T> builder() { in builder()
41 return new AutoValue_RequiredMeasurement.Builder<T>(); in builder()
50 public abstract BiPredicate<T, T> predicate(); in predicate()
55 public abstract ImmutableMap<Integer, T> expectedValues(); in expectedValues()
57 public void setMeasuredValue(T measuredValue) { in setMeasuredValue()
63 public static abstract class Builder<T> {
65 public abstract Builder<T> setId(String id); in setId()
67 public abstract Builder<T> setPredicate(BiPredicate<T, T> predicate); in setPredicate() argument
[all …]
/cts/tests/framework/base/windowmanager/jetpack/src/android/server/wm/jetpack/extensions/util/
DTestValueCountConsumer.java36 public class TestValueCountConsumer<T> implements Consumer<T> {
41 private LinkedBlockingQueue<T> mLinkedBlockingQueue;
42 private T mLastReportedValue;
49 public void accept(T value) { in accept()
63 public T waitAndGet() throws InterruptedException { in waitAndGet()
64 T value = null; in waitAndGet()
77 public List<T> waitAndGetAllValues() throws InterruptedException { in waitAndGetAllValues()
78 List<T> values = new ArrayList<>(); in waitAndGetAllValues()
80 T value = mLinkedBlockingQueue.poll(TIMEOUT_MS, TimeUnit.MILLISECONDS); in waitAndGetAllValues()
96 public T getLastReportedValue() { in getLastReportedValue()
/cts/tests/tests/display/src/android/display/cts/
DTestBase.java53 protected <T extends Activity> T launchActivity(ActivityTestRule<T> activityRule) { in launchActivity()
54 final T activity = activityRule.launchActivity(null); in launchActivity()
77 private <T extends Activity> T launchActivity( in launchActivity()
79 Class<T> activityCls, in launchActivity()
101 private <T extends Activity> T launchActivityWithIntent( in launchActivityWithIntent()
103 Class<T> activityCls, in launchActivityWithIntent()
107 T activity = (T) InstrumentationRegistry.getInstrumentation().startActivitySync(intent); in launchActivityWithIntent()
/cts/hostsidetests/appsecurity/src/android/appsecurity/cts/
DBaseInstallMultiple.java43 public class BaseInstallMultiple<T extends BaseInstallMultiple<?>> {
106 T addArg(String arg) { in addArg()
108 return (T) this; in addArg()
111 T addFile(String file) throws FileNotFoundException { in addFile()
114 return (T) this; in addFile()
117 T disableFileNamePrefix() { in disableFileNamePrefix()
119 return (T) this; in disableFileNamePrefix()
122 T addRemoteFile(String remoteFile) { in addRemoteFile()
124 return (T) this; in addRemoteFile()
127 T renameAndAddFile(String localFile, String remoteFile) throws FileNotFoundException { in renameAndAddFile()
[all …]
/cts/tests/tests/time/src/android/app/time/cts/
DParcelableTestSupport.java33 public static <T extends Parcelable> T roundTripParcelable(T parcelable) { in roundTripParcelable()
38 Parcelable.Creator<T> creator; in roundTripParcelable()
41 creator = (Parcelable.Creator<T>) creatorField.get(null); in roundTripParcelable()
45 T toReturn = parcel.readTypedObject(creator); in roundTripParcelable()
50 public static <T extends Parcelable> void assertRoundTripParcelable(T instance) { in assertRoundTripParcelable()
/cts/tests/tests/companion/common/src/android/companion/cts/common/
DInvocationTracker.kt23 interface InvocationTracker<T> {
24 val invocations: List<T>
51 fun recordInvocation(invocation: T) in clearRecordedInvocations()
54 internal class InvocationContainer<T> : InvocationTracker<T> { in clearRecordedInvocations()
55 private val _invocations: MutableList<T> = mutableListOf() in clearRecordedInvocations()
56 override val invocations: List<T> in clearRecordedInvocations()
64 override fun recordInvocation(invocation: T) { in clearRecordedInvocations()

12345678910>>...13