*/
package org.opendaylight.yangtools.util;
+import com.google.common.base.Preconditions;
+import com.romix.scala.collection.concurrent.TrieMap;
import java.util.Collection;
import java.util.Collections;
import java.util.Map;
import java.util.Set;
-
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.google.common.base.Preconditions;
-import com.romix.scala.collection.concurrent.TrieMap;
-
/**
* A TrieMap facade tracking modifications. Since we change structures based on
* their size, and determining the size of a TrieMap is expensive, we make sure
* to update it as we go.
*
- * FIXME: this map does not support modification view the keySet()/values()/entrySet()
+ * <p>FIXME: this map does not support modification view the keySet()/values()/entrySet()
* methods.
*
* @param <K> Key type
private final TrieMap<K, V> delegate;
private int size;
+ ReadWriteTrieMap() {
+ this.delegate = new TrieMap<>();
+ this.size = 0;
+ }
+
ReadWriteTrieMap(final TrieMap<K, V> delegate, final int size) {
this.delegate = Preconditions.checkNotNull(delegate);
this.size = size;