提交 630aaa81 authored 作者: Andrei Tokar's avatar Andrei Tokar

MVMap.sizeAsLong() MVMap.empty()

上级 c9318893
......@@ -995,15 +995,12 @@ public class MVMap<K, V> extends AbstractMap<K, V>
* @return the number of entries
*/
public final long sizeAsLong() {
RootReference rootReference = getRoot();
return rootReference.root.getTotalCount() + rootReference.getAppendCounter();
return getRoot().getTotalCount();
}
@Override
public boolean isEmpty() {
RootReference rootReference = getRoot();
Page rootPage = rootReference.root;
return rootPage.isLeaf() && rootPage.getKeyCount() == 0 && rootReference.getAppendCounter() == 0;
return sizeAsLong() == 0;
}
public final long getCreateVersion() {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论