mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-11-14 01:47:17 +01:00
50 lines
1.9 KiB
Java
50 lines
1.9 KiB
Java
package com.fasterxml.jackson.annotation;
|
|
|
|
import androidx.databinding.ViewDataBindingKtx$$ExternalSyntheticLambda0;
|
|
import com.amazon.alexa.ra.core.ui.markdown.parser.formatter.MarkdownConstants;
|
|
import com.fasterxml.jackson.annotation.ObjectIdGenerator;
|
|
import java.util.HashMap;
|
|
import java.util.Map;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
/* loaded from: classes7.dex */
|
|
public class SimpleObjectIdResolver implements ObjectIdResolver {
|
|
protected Map<ObjectIdGenerator.IdKey, Object> _items;
|
|
|
|
@Override // com.fasterxml.jackson.annotation.ObjectIdResolver
|
|
public void bindItem(ObjectIdGenerator.IdKey idKey, Object obj) {
|
|
Map<ObjectIdGenerator.IdKey, Object> map = this._items;
|
|
if (map == null) {
|
|
this._items = new HashMap();
|
|
} else {
|
|
Object obj2 = map.get(idKey);
|
|
if (obj2 != null) {
|
|
if (obj2 == obj) {
|
|
return;
|
|
}
|
|
ViewDataBindingKtx$$ExternalSyntheticLambda0.m("Already had POJO for id (", idKey.key.getClass().getName(), ") [", idKey, MarkdownConstants.RIGHT_BRACKET);
|
|
return;
|
|
}
|
|
}
|
|
this._items.put(idKey, obj);
|
|
}
|
|
|
|
@Override // com.fasterxml.jackson.annotation.ObjectIdResolver
|
|
public boolean canUseFor(ObjectIdResolver objectIdResolver) {
|
|
return objectIdResolver.getClass() == getClass();
|
|
}
|
|
|
|
@Override // com.fasterxml.jackson.annotation.ObjectIdResolver
|
|
public ObjectIdResolver newForDeserialization(Object obj) {
|
|
return new SimpleObjectIdResolver();
|
|
}
|
|
|
|
@Override // com.fasterxml.jackson.annotation.ObjectIdResolver
|
|
public Object resolveId(ObjectIdGenerator.IdKey idKey) {
|
|
Map<ObjectIdGenerator.IdKey, Object> map = this._items;
|
|
if (map == null) {
|
|
return null;
|
|
}
|
|
return map.get(idKey);
|
|
}
|
|
}
|