Java中的大多数映射类都会覆盖AbstractMap并使用它的equals方法实现来检查:
包含所有条目 this
if (o == this)
return true;
//check that passed object is of type Map
if (!(o instanceof Map))
return false;
Map<?,?> m = (Map<?,?>) o;
//check that passed object has same length
if (m.size() != size())
return false;
//passed object contains all the entries
try {
Iterator<Entry<K,V>> i = entrySet().iterator();
while (i.hasNext()) {
Entry<K,V> e = i.next();
K key = e.getKey();
V value = e.getValue();
if (value == null) {
if …Run Code Online (Sandbox Code Playgroud)只是想知道github服务器是否支持git wire protocol-v2?- https://opensource.googleblog.com/2018/05/introducing-git-protocol-version-2.html - https://github.com/git/git/blob/master/Documentation/technical/protocol-v2 .文本