mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-11-28 00:33:22 +01:00
68 lines
2.3 KiB
Java
68 lines
2.3 KiB
Java
package org.apache.http.params;
|
|
|
|
import java.util.HashSet;
|
|
import java.util.Set;
|
|
import okio.Buffer$$ExternalSyntheticBUOutline0;
|
|
import org.apache.http.util.Args;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
@Deprecated
|
|
/* loaded from: classes11.dex */
|
|
public final class DefaultedHttpParams extends AbstractHttpParams {
|
|
private final HttpParams defaults;
|
|
private final HttpParams local;
|
|
|
|
public DefaultedHttpParams(HttpParams httpParams, HttpParams httpParams2) {
|
|
this.local = (HttpParams) Args.notNull(httpParams, "Local HTTP parameters");
|
|
this.defaults = httpParams2;
|
|
}
|
|
|
|
@Override // org.apache.http.params.HttpParams
|
|
public HttpParams copy() {
|
|
return new DefaultedHttpParams(this.local.copy(), this.defaults);
|
|
}
|
|
|
|
public Set<String> getDefaultNames() {
|
|
return new HashSet(getNames(this.defaults));
|
|
}
|
|
|
|
public HttpParams getDefaults() {
|
|
return this.defaults;
|
|
}
|
|
|
|
public Set<String> getLocalNames() {
|
|
return new HashSet(getNames(this.local));
|
|
}
|
|
|
|
@Override // org.apache.http.params.AbstractHttpParams, org.apache.http.params.HttpParamsNames
|
|
public Set<String> getNames() {
|
|
HashSet hashSet = new HashSet(getNames(this.defaults));
|
|
hashSet.addAll(getNames(this.local));
|
|
return hashSet;
|
|
}
|
|
|
|
@Override // org.apache.http.params.HttpParams
|
|
public Object getParameter(String str) {
|
|
HttpParams httpParams;
|
|
Object parameter = this.local.getParameter(str);
|
|
return (parameter != null || (httpParams = this.defaults) == null) ? parameter : httpParams.getParameter(str);
|
|
}
|
|
|
|
@Override // org.apache.http.params.HttpParams
|
|
public boolean removeParameter(String str) {
|
|
return this.local.removeParameter(str);
|
|
}
|
|
|
|
@Override // org.apache.http.params.HttpParams
|
|
public HttpParams setParameter(String str, Object obj) {
|
|
return this.local.setParameter(str, obj);
|
|
}
|
|
|
|
private Set<String> getNames(HttpParams httpParams) {
|
|
if (httpParams instanceof HttpParamsNames) {
|
|
return ((HttpParamsNames) httpParams).getNames();
|
|
}
|
|
Buffer$$ExternalSyntheticBUOutline0.m$1("HttpParams instance does not implement HttpParamsNames");
|
|
return null;
|
|
}
|
|
}
|