Files
rr3-apk/decompiled/sources/com/google/protobuf/LazyField.java
Daniel Elliott f9d20bb3fc Add decompiled APK source code (JADX)
- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-02-18 14:52:23 -08:00

96 lines
2.8 KiB
Java

package com.google.protobuf;
import java.util.Iterator;
import java.util.Map;
/* loaded from: classes3.dex */
public class LazyField extends LazyFieldLite {
private final MessageLite defaultInstance;
public LazyField(MessageLite messageLite, ExtensionRegistryLite extensionRegistryLite, ByteString byteString) {
super(extensionRegistryLite, byteString);
this.defaultInstance = messageLite;
}
@Override // com.google.protobuf.LazyFieldLite
public boolean containsDefaultInstance() {
return super.containsDefaultInstance() || this.value == this.defaultInstance;
}
public MessageLite getValue() {
return getValue(this.defaultInstance);
}
@Override // com.google.protobuf.LazyFieldLite
public int hashCode() {
return getValue().hashCode();
}
@Override // com.google.protobuf.LazyFieldLite
public boolean equals(Object obj) {
return getValue().equals(obj);
}
public String toString() {
return getValue().toString();
}
public static class LazyEntry implements Map.Entry {
private Map.Entry<Object, LazyField> entry;
private LazyEntry(Map.Entry<Object, LazyField> entry) {
this.entry = entry;
}
@Override // java.util.Map.Entry
public Object getKey() {
return this.entry.getKey();
}
@Override // java.util.Map.Entry
public Object getValue() {
LazyField value = this.entry.getValue();
if (value == null) {
return null;
}
return value.getValue();
}
public LazyField getField() {
return this.entry.getValue();
}
@Override // java.util.Map.Entry
public Object setValue(Object obj) {
if (!(obj instanceof MessageLite)) {
throw new IllegalArgumentException("LazyField now only used for MessageSet, and the value of MessageSet must be an instance of MessageLite");
}
return this.entry.getValue().setValue((MessageLite) obj);
}
}
public static class LazyIterator implements Iterator {
private Iterator<Map.Entry<Object, Object>> iterator;
public LazyIterator(Iterator<Map.Entry<Object, Object>> it) {
this.iterator = it;
}
@Override // java.util.Iterator
public boolean hasNext() {
return this.iterator.hasNext();
}
@Override // java.util.Iterator
public Map.Entry<Object, Object> next() {
Map.Entry<Object, Object> next = this.iterator.next();
return next.getValue() instanceof LazyField ? new LazyEntry(next) : next;
}
@Override // java.util.Iterator
public void remove() {
this.iterator.remove();
}
}
}