Rabbit-R1/original r1/java/sources/androidx/databinding/ObservableBoolean.java
2024-05-21 17:08:36 -04:00

56 lines
1.6 KiB
Java

package androidx.databinding;
import android.os.Parcel;
import android.os.Parcelable;
import java.io.Serializable;
/* loaded from: classes.dex */
public class ObservableBoolean extends BaseObservableField implements Parcelable, Serializable {
public static final Parcelable.Creator<ObservableBoolean> CREATOR = new Parcelable.Creator<ObservableBoolean>() { // from class: androidx.databinding.ObservableBoolean.1
/* JADX WARN: Can't rename method to resolve collision */
@Override // android.os.Parcelable.Creator
public ObservableBoolean createFromParcel(Parcel parcel) {
return new ObservableBoolean(parcel.readInt() == 1);
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // android.os.Parcelable.Creator
public ObservableBoolean[] newArray(int i) {
return new ObservableBoolean[i];
}
};
static final long serialVersionUID = 1;
private boolean mValue;
@Override // android.os.Parcelable
public int describeContents() {
return 0;
}
public boolean get() {
return this.mValue;
}
public ObservableBoolean(boolean z) {
this.mValue = z;
}
public ObservableBoolean() {
}
public ObservableBoolean(Observable... observableArr) {
super(observableArr);
}
public void set(boolean z) {
if (z != this.mValue) {
this.mValue = z;
notifyChange();
}
}
@Override // android.os.Parcelable
public void writeToParcel(Parcel parcel, int i) {
parcel.writeInt(this.mValue ? 1 : 0);
}
}