1.0.0-RC2 #19

Merged
ZhouXY108 merged 106 commits from 1.x.x into dev 2025-01-07 17:18:48 +08:00
Showing only changes of commit 7951172d68 - Show all commits

View File

@ -20,6 +20,7 @@ import java.util.Collection;
import java.util.Collections;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Objects;
import java.util.Optional;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
@ -166,6 +167,24 @@ public abstract class AbstractMapWrapper<K, V, T extends AbstractMapWrapper<K, V
return this.map.toString();
}
@Override
public int hashCode() {
return Objects.hash(map);
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
@SuppressWarnings("rawtypes")
AbstractMapWrapper other = (AbstractMapWrapper) obj;
return Objects.equals(map, other.map);
}
public abstract static class Builder<K, V, T extends AbstractMapWrapper<K, V, T>> {
protected final Map<K, V> map;
protected Consumer<K> keyChecker;