30 lines
1.5 KiB
Java
30 lines
1.5 KiB
Java
package androidx.lifecycle;
|
|
|
|
import d0.z.d.m;
|
|
import kotlin.jvm.functions.Function1;
|
|
/* compiled from: Transformations.kt */
|
|
public final class TransformationsKt {
|
|
public static final <X> LiveData<X> distinctUntilChanged(LiveData<X> liveData) {
|
|
m.checkNotNullParameter(liveData, "$this$distinctUntilChanged");
|
|
LiveData<X> distinctUntilChanged = Transformations.distinctUntilChanged(liveData);
|
|
m.checkNotNullExpressionValue(distinctUntilChanged, "Transformations.distinctUntilChanged(this)");
|
|
return distinctUntilChanged;
|
|
}
|
|
|
|
public static final <X, Y> LiveData<Y> map(LiveData<X> liveData, Function1<? super X, ? extends Y> function1) {
|
|
m.checkNotNullParameter(liveData, "$this$map");
|
|
m.checkNotNullParameter(function1, "transform");
|
|
LiveData<Y> map = Transformations.map(liveData, new TransformationsKt$map$1(function1));
|
|
m.checkNotNullExpressionValue(map, "Transformations.map(this) { transform(it) }");
|
|
return map;
|
|
}
|
|
|
|
public static final <X, Y> LiveData<Y> switchMap(LiveData<X> liveData, Function1<? super X, ? extends LiveData<Y>> function1) {
|
|
m.checkNotNullParameter(liveData, "$this$switchMap");
|
|
m.checkNotNullParameter(function1, "transform");
|
|
LiveData<Y> switchMap = Transformations.switchMap(liveData, new TransformationsKt$switchMap$1(function1));
|
|
m.checkNotNullExpressionValue(switchMap, "Transformations.switchMap(this) { transform(it) }");
|
|
return switchMap;
|
|
}
|
|
}
|