mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-11-21 05:13:20 +01:00
66 lines
2 KiB
Java
66 lines
2 KiB
Java
package org.apache.http.message;
|
|
|
|
import java.io.Serializable;
|
|
import org.apache.http.NameValuePair;
|
|
import org.apache.http.annotation.Contract;
|
|
import org.apache.http.annotation.ThreadingBehavior;
|
|
import org.apache.http.util.Args;
|
|
import org.apache.http.util.LangUtils;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
@Contract(threading = ThreadingBehavior.IMMUTABLE)
|
|
/* loaded from: classes11.dex */
|
|
public class BasicNameValuePair implements NameValuePair, Cloneable, Serializable {
|
|
private static final long serialVersionUID = -6437800749411518984L;
|
|
private final String name;
|
|
private final String value;
|
|
|
|
public BasicNameValuePair(String str, String str2) {
|
|
this.name = (String) Args.notNull(str, "Name");
|
|
this.value = str2;
|
|
}
|
|
|
|
public Object clone() throws CloneNotSupportedException {
|
|
return super.clone();
|
|
}
|
|
|
|
public boolean equals(Object obj) {
|
|
if (this == obj) {
|
|
return true;
|
|
}
|
|
if (obj instanceof NameValuePair) {
|
|
BasicNameValuePair basicNameValuePair = (BasicNameValuePair) obj;
|
|
if (this.name.equals(basicNameValuePair.name) && LangUtils.equals(this.value, basicNameValuePair.value)) {
|
|
return true;
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
@Override // org.apache.http.NameValuePair
|
|
public String getName() {
|
|
return this.name;
|
|
}
|
|
|
|
@Override // org.apache.http.NameValuePair
|
|
public String getValue() {
|
|
return this.value;
|
|
}
|
|
|
|
public int hashCode() {
|
|
return LangUtils.hashCode(LangUtils.hashCode(17, this.name), this.value);
|
|
}
|
|
|
|
public String toString() {
|
|
String str = this.value;
|
|
String str2 = this.name;
|
|
if (str == null) {
|
|
return str2;
|
|
}
|
|
StringBuilder sb = new StringBuilder(this.value.length() + str2.length() + 1);
|
|
sb.append(this.name);
|
|
sb.append("=");
|
|
sb.append(this.value);
|
|
return sb.toString();
|
|
}
|
|
}
|