43 lines
1.2 KiB
Java
43 lines
1.2 KiB
Java
|
package com.huawei.hms.common.api;
|
||
|
|
||
|
import com.huawei.hms.common.internal.Preconditions;
|
||
|
import com.huawei.hms.support.api.client.Result;
|
||
|
import com.huawei.hms.support.api.client.Status;
|
||
|
|
||
|
/* loaded from: classes2.dex */
|
||
|
public class BooleanResult extends Result {
|
||
|
private final Status myStatus;
|
||
|
private final boolean resultValue;
|
||
|
|
||
|
public BooleanResult(Status status, boolean z) {
|
||
|
Preconditions.checkNotNull(status, "status cannot be null");
|
||
|
this.myStatus = status;
|
||
|
this.resultValue = z;
|
||
|
}
|
||
|
|
||
|
public final boolean equals(Object obj) {
|
||
|
if (this == obj) {
|
||
|
return true;
|
||
|
}
|
||
|
if (!(obj instanceof BooleanResult)) {
|
||
|
return false;
|
||
|
}
|
||
|
BooleanResult booleanResult = (BooleanResult) obj;
|
||
|
return this.resultValue == booleanResult.getValue() && this.myStatus.equals(booleanResult.getStatus());
|
||
|
}
|
||
|
|
||
|
public final int hashCode() {
|
||
|
boolean z = this.resultValue;
|
||
|
return (z ? 1 : 0) + ((this.myStatus.hashCode() + 127) * 77);
|
||
|
}
|
||
|
|
||
|
public boolean getValue() {
|
||
|
return this.resultValue;
|
||
|
}
|
||
|
|
||
|
@Override // com.huawei.hms.support.api.client.Result
|
||
|
public Status getStatus() {
|
||
|
return this.myStatus;
|
||
|
}
|
||
|
}
|