All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.koloboke.collect.impl.hash.QHashSeparateKVObjIntMapFactoryGO Maven / Gradle / Ivy

Go to download

Carefully designed and efficient extension of the Java Collections Framework with primitive specializations and more, built for Java 8 (Implementation)

The newest version!
/*
 * Copyright 2014 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.koloboke.collect.impl.hash;

import com.koloboke.collect.*;
import com.koloboke.collect.hash.*;
import com.koloboke.collect.impl.*;
import com.koloboke.collect.map.hash.HashObjIntMapFactory;
import java.util.function.Consumer;
import java.util.function.Predicate;
import com.koloboke.collect.map.hash.HashObjIntMap;

import javax.annotation.Nonnull;
import java.util.*;

import static com.koloboke.collect.impl.Containers.sizeAsInt;
import static com.koloboke.collect.impl.hash.LHashCapacities.configIsSuitableForMutableLHash;


public abstract class QHashSeparateKVObjIntMapFactoryGO
        extends QHashSeparateKVObjIntMapFactorySO {

    QHashSeparateKVObjIntMapFactoryGO(HashConfig hashConf, int defaultExpectedSize
            , boolean isNullKeyAllowed
            ) {
        super(hashConf, defaultExpectedSize, isNullKeyAllowed
            );
    }

    

    abstract HashObjIntMapFactory thisWith(HashConfig hashConf, int defaultExpectedSize, boolean isNullKeyAllowed
            );

    abstract HashObjIntMapFactory lHashLikeThisWith(HashConfig hashConf, int defaultExpectedSize, boolean isNullKeyAllowed
            );

    abstract HashObjIntMapFactory qHashLikeThisWith(HashConfig hashConf, int defaultExpectedSize, boolean isNullKeyAllowed
            );

    @Override
    public final HashObjIntMapFactory withHashConfig(@Nonnull HashConfig hashConf) {
        if (configIsSuitableForMutableLHash(hashConf))
            return lHashLikeThisWith(hashConf, getDefaultExpectedSize()
            , isNullKeyAllowed());
        return qHashLikeThisWith(hashConf, getDefaultExpectedSize()
            , isNullKeyAllowed());
    }

    @Override
    public final HashObjIntMapFactory withDefaultExpectedSize(int defaultExpectedSize) {
        if (defaultExpectedSize == getDefaultExpectedSize())
            return this;
        return thisWith(getHashConfig(), defaultExpectedSize
                , isNullKeyAllowed());
    }

    @Override
    public final HashObjIntMapFactory withNullKeyAllowed(boolean nullKeyAllowed) {
        if (nullKeyAllowed == isNullKeyAllowed())
            return this;
        return thisWith(getHashConfig(), getDefaultExpectedSize(), nullKeyAllowed);
    }

    @Override
    public String toString() {
        return "HashObjIntMapFactory[" + commonString() + keySpecialString() +
                ",defaultValue=" + getDefaultValue() +
        "]";
    }

    @Override
    public int hashCode() {
        int hashCode = keySpecialHashCode(commonHashCode());
        hashCode = hashCode * 31 + Primitives.hashCode(getDefaultValue());
        return hashCode;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj instanceof HashObjIntMapFactory) {
            HashObjIntMapFactory factory = (HashObjIntMapFactory) obj;
            return commonEquals(factory) && keySpecialEquals(factory) &&
                    // boxing to treat NaNs correctly
                   ((Integer) getDefaultValue()).equals(factory.getDefaultValue())
                    ;
        } else {
            return false;
        }
    }

    @Override
    public int getDefaultValue() {
        return 0;
    }

    

    

    

    

    

    

    
    

    
    

    private 
     UpdatableQHashSeparateKVObjIntMapGO shrunk(
            UpdatableQHashSeparateKVObjIntMapGO map) {
        Predicate shrinkCondition;
        if ((shrinkCondition = hashConf.getShrinkCondition()) != null) {
            if (shrinkCondition.test(map))
                map.shrink();
        }
        return map;
    }

    @Override
    @Nonnull
    public 
     UpdatableQHashSeparateKVObjIntMapGO newUpdatableMap() {
        return this.newUpdatableMap(getDefaultExpectedSize());
    }
    @Override
    @Nonnull
    public 
     MutableQHashSeparateKVObjIntMapGO newMutableMap() {
        return this.newMutableMap(getDefaultExpectedSize());
    }

    @Override
    @Nonnull
    public 
     UpdatableQHashSeparateKVObjIntMapGO newUpdatableMap(
            Map map) {
        return this.newUpdatableMap(map, map.size());
    }

    @Override
    @Nonnull
    public 
     UpdatableQHashSeparateKVObjIntMapGO newUpdatableMap(
            Map map1, Map map2) {
        long expectedSize = (long) map1.size();
        expectedSize += (long) map2.size();
        return this.newUpdatableMap(map1, map2, sizeAsInt(expectedSize));
    }

    @Override
    @Nonnull
    public 
     UpdatableQHashSeparateKVObjIntMapGO newUpdatableMap(
            Map map1, Map map2,
            Map map3) {
        long expectedSize = (long) map1.size();
        expectedSize += (long) map2.size();
        expectedSize += (long) map3.size();
        return this.newUpdatableMap(map1, map2, map3, sizeAsInt(expectedSize));
    }

    @Override
    @Nonnull
    public 
     UpdatableQHashSeparateKVObjIntMapGO newUpdatableMap(
            Map map1, Map map2,
            Map map3, Map map4) {
        long expectedSize = (long) map1.size();
        expectedSize += (long) map2.size();
        expectedSize += (long) map3.size();
        expectedSize += (long) map4.size();
        return this.newUpdatableMap(map1, map2, map3, map4, sizeAsInt(expectedSize));
    }

    @Override
    @Nonnull
    public 
     UpdatableQHashSeparateKVObjIntMapGO newUpdatableMap(
            Map map1, Map map2,
            Map map3, Map map4,
            Map map5) {
        long expectedSize = (long) map1.size();
        expectedSize += (long) map2.size();
        expectedSize += (long) map3.size();
        expectedSize += (long) map4.size();
        expectedSize += (long) map5.size();
        return this.newUpdatableMap(map1, map2, map3, map4, map5, sizeAsInt(expectedSize));
    }

    @Override
    @Nonnull
    public 
     UpdatableQHashSeparateKVObjIntMapGO newUpdatableMap(
            Map map, int expectedSize) {
        return shrunk(super.newUpdatableMap(map, expectedSize));
    }

    @Override
    @Nonnull
    public 
     UpdatableQHashSeparateKVObjIntMapGO newUpdatableMap(
            Map map1, Map map2,
            int expectedSize) {
        UpdatableQHashSeparateKVObjIntMapGO map = newUpdatableMap(expectedSize);
        map.putAll(map1);
        map.putAll(map2);
        return shrunk(map);
    }

    @Override
    @Nonnull
    public 
     UpdatableQHashSeparateKVObjIntMapGO newUpdatableMap(
            Map map1, Map map2,
            Map map3, int expectedSize) {
        UpdatableQHashSeparateKVObjIntMapGO map = newUpdatableMap(expectedSize);
        map.putAll(map1);
        map.putAll(map2);
        map.putAll(map3);
        return shrunk(map);
    }

    @Override
    @Nonnull
    public 
     UpdatableQHashSeparateKVObjIntMapGO newUpdatableMap(
            Map map1, Map map2,
            Map map3, Map map4,
            int expectedSize) {
        UpdatableQHashSeparateKVObjIntMapGO map = newUpdatableMap(expectedSize);
        map.putAll(map1);
        map.putAll(map2);
        map.putAll(map3);
        map.putAll(map4);
        return shrunk(map);
    }

    @Override
    @Nonnull
    public 
     UpdatableQHashSeparateKVObjIntMapGO newUpdatableMap(
            Map map1, Map map2,
            Map map3, Map map4,
            Map map5, int expectedSize) {
        UpdatableQHashSeparateKVObjIntMapGO map = newUpdatableMap(expectedSize);
        map.putAll(map1);
        map.putAll(map2);
        map.putAll(map3);
        map.putAll(map4);
        map.putAll(map5);
        return shrunk(map);
    }


    @Override
    @Nonnull
    public 
     UpdatableQHashSeparateKVObjIntMapGO newUpdatableMap(
            Consumer> entriesSupplier) {
        return this.newUpdatableMap(entriesSupplier, getDefaultExpectedSize());
    }

    @Override
    @Nonnull
    public 
     UpdatableQHashSeparateKVObjIntMapGO newUpdatableMap(
            Consumer> entriesSupplier,
            int expectedSize) {
        final UpdatableQHashSeparateKVObjIntMapGO map = newUpdatableMap(expectedSize);
        entriesSupplier.accept(new com.koloboke.function.ObjIntConsumer() {
             @Override
             public void accept(K2 k, int v) {
                 map.put(k, v);
             }
         });
        return shrunk(map);
    }

    @Override
    @Nonnull
    public 
     UpdatableQHashSeparateKVObjIntMapGO newUpdatableMap(
            K2[] keys, int[] values) {
        return this.newUpdatableMap(keys, values, keys.length);
    }

    @Override
    @Nonnull
    public 
     UpdatableQHashSeparateKVObjIntMapGO newUpdatableMap(
            K2[] keys, int[] values, int expectedSize) {
        UpdatableQHashSeparateKVObjIntMapGO map = newUpdatableMap(expectedSize);
        int keysLen = keys.length;
        if (keysLen != values.length)
            throw new IllegalArgumentException("keys and values arrays must have the same size");
        for (int i = 0; i < keys.length; i++) {
            map.put(keys[i], values[i]);
        }
        return shrunk(map);
    }

    @Override
    @Nonnull
    public 
     UpdatableQHashSeparateKVObjIntMapGO newUpdatableMap(
            K2[] keys, Integer[] values) {
        return this.newUpdatableMap(keys, values, keys.length);
    }

    @Override
    @Nonnull
    public 
     UpdatableQHashSeparateKVObjIntMapGO newUpdatableMap(
            K2[] keys, Integer[] values, int expectedSize) {
        UpdatableQHashSeparateKVObjIntMapGO map = newUpdatableMap(expectedSize);
        int keysLen = keys.length;
        if (keysLen != values.length)
            throw new IllegalArgumentException("keys and values arrays must have the same size");
        for (int i = 0; i < keys.length; i++) {
            map.put(keys[i], values[i]);
        }
        return shrunk(map);
    }

    @Override
    @Nonnull
    public 
     UpdatableQHashSeparateKVObjIntMapGO newUpdatableMap(
            Iterable keys, Iterable values) {
        int expectedSize = keys instanceof Collection ? ((Collection) keys).size() :
                getDefaultExpectedSize();
        return this.newUpdatableMap(keys, values, expectedSize);
    }

    @Override
    @Nonnull
    public 
     UpdatableQHashSeparateKVObjIntMapGO newUpdatableMap(
            Iterable keys, Iterable values, int expectedSize) {
        UpdatableQHashSeparateKVObjIntMapGO map = newUpdatableMap(expectedSize);
        Iterator keysIt = keys.iterator();
        Iterator valuesIt = values.iterator();
        try {
            while (keysIt.hasNext()) {
                map.put(keysIt.next(), valuesIt.next());
            }
            return shrunk(map);
        } catch (NoSuchElementException e) {
            throw new IllegalArgumentException(
                    "keys and values iterables must have the same size", e);
        }
    }

    @Override
    @Nonnull
    public 
     UpdatableQHashSeparateKVObjIntMapGO newUpdatableMapOf(
            K2 k1, int v1) {
        UpdatableQHashSeparateKVObjIntMapGO map = newUpdatableMap(1);
        map.put(k1, v1);
        return map;
    }

    @Override
    public 
     UpdatableQHashSeparateKVObjIntMapGO newUpdatableMapOf(
            K2 k1, int v1, K2 k2, int v2) {
        UpdatableQHashSeparateKVObjIntMapGO map = newUpdatableMap(2);
        map.put(k1, v1);
        map.put(k2, v2);
        return map;
    }

    @Override
    @Nonnull
    public 
     UpdatableQHashSeparateKVObjIntMapGO newUpdatableMapOf(
            K2 k1, int v1, K2 k2, int v2,
            K2 k3, int v3) {
        UpdatableQHashSeparateKVObjIntMapGO map = newUpdatableMap(3);
        map.put(k1, v1);
        map.put(k2, v2);
        map.put(k3, v3);
        return map;
    }

    @Override
    @Nonnull
    public 
     UpdatableQHashSeparateKVObjIntMapGO newUpdatableMapOf(
            K2 k1, int v1, K2 k2, int v2,
            K2 k3, int v3, K2 k4, int v4) {
        UpdatableQHashSeparateKVObjIntMapGO map = newUpdatableMap(4);
        map.put(k1, v1);
        map.put(k2, v2);
        map.put(k3, v3);
        map.put(k4, v4);
        return map;
    }

    @Override
    @Nonnull
    public 
     UpdatableQHashSeparateKVObjIntMapGO newUpdatableMapOf(
            K2 k1, int v1, K2 k2, int v2,
            K2 k3, int v3, K2 k4, int v4,
            K2 k5, int v5) {
        UpdatableQHashSeparateKVObjIntMapGO map = newUpdatableMap(5);
        map.put(k1, v1);
        map.put(k2, v2);
        map.put(k3, v3);
        map.put(k4, v4);
        map.put(k5, v5);
        return map;
    }

    
    

    @Override
    @Nonnull
    public 
     HashObjIntMap newMutableMap(
            Map map, int expectedSize) {
        MutableQHashSeparateKVObjIntMapGO res = uninitializedMutableMap();
        res.move(this.newUpdatableMap(map, expectedSize));
        return res;
    }

    @Override
    @Nonnull
    public 
     HashObjIntMap newMutableMap(Map map1,
            Map map2, int expectedSize) {
        MutableQHashSeparateKVObjIntMapGO res = uninitializedMutableMap();
        res.move(this.newUpdatableMap(map1, map2, expectedSize));
        return res;
    }

    @Override
    @Nonnull
    public 
     HashObjIntMap newMutableMap(Map map1,
            Map map2, Map map3, int expectedSize) {
        MutableQHashSeparateKVObjIntMapGO res = uninitializedMutableMap();
        res.move(this.newUpdatableMap(map1, map2, map3, expectedSize));
        return res;
    }

    @Override
    @Nonnull
    public 
     HashObjIntMap newMutableMap(Map map1,
            Map map2, Map map3,
            Map map4, int expectedSize) {
        MutableQHashSeparateKVObjIntMapGO res = uninitializedMutableMap();
        res.move(this.newUpdatableMap(map1, map2, map3, map4, expectedSize));
        return res;
    }

    @Override
    @Nonnull
    public 
     HashObjIntMap newMutableMap(Map map1,
            Map map2, Map map3,
            Map map4, Map map5, int expectedSize) {
        MutableQHashSeparateKVObjIntMapGO res = uninitializedMutableMap();
        res.move(this.newUpdatableMap(map1, map2, map3, map4, map5, expectedSize));
        return res;
    }



    @Override
    @Nonnull
    public 
     HashObjIntMap newMutableMap(
            Consumer> entriesSupplier
            , int expectedSize) {
        MutableQHashSeparateKVObjIntMapGO map = uninitializedMutableMap();
        map.move(this.newUpdatableMap(entriesSupplier, expectedSize));
        return map;
    }

    @Override
    @Nonnull
    public 
     HashObjIntMap newMutableMap(K2[] keys,
            int[] values, int expectedSize) {
        MutableQHashSeparateKVObjIntMapGO map = uninitializedMutableMap();
        map.move(this.newUpdatableMap(keys, values, expectedSize));
        return map;
    }

    @Override
    @Nonnull
    public 
     HashObjIntMap newMutableMap(
            K2[] keys, Integer[] values, int expectedSize) {
        MutableQHashSeparateKVObjIntMapGO map = uninitializedMutableMap();
        map.move(this.newUpdatableMap(keys, values, expectedSize));
        return map;
    }

    @Override
    @Nonnull
    public 
     HashObjIntMap newMutableMap(Iterable keys,
            Iterable values, int expectedSize) {
        MutableQHashSeparateKVObjIntMapGO map = uninitializedMutableMap();
        map.move(this.newUpdatableMap(keys, values, expectedSize));
        return map;
    }

    
    

    @Override
    @Nonnull
    public 
     HashObjIntMap newMutableMap(
            Map map) {
        MutableQHashSeparateKVObjIntMapGO res = uninitializedMutableMap();
        res.move(this.newUpdatableMap(map));
        return res;
    }

    @Override
    @Nonnull
    public 
     HashObjIntMap newMutableMap(Map map1,
            Map map2) {
        MutableQHashSeparateKVObjIntMapGO res = uninitializedMutableMap();
        res.move(this.newUpdatableMap(map1, map2));
        return res;
    }

    @Override
    @Nonnull
    public 
     HashObjIntMap newMutableMap(Map map1,
            Map map2, Map map3) {
        MutableQHashSeparateKVObjIntMapGO res = uninitializedMutableMap();
        res.move(this.newUpdatableMap(map1, map2, map3));
        return res;
    }

    @Override
    @Nonnull
    public 
     HashObjIntMap newMutableMap(Map map1,
            Map map2, Map map3,
            Map map4) {
        MutableQHashSeparateKVObjIntMapGO res = uninitializedMutableMap();
        res.move(this.newUpdatableMap(map1, map2, map3, map4));
        return res;
    }

    @Override
    @Nonnull
    public 
     HashObjIntMap newMutableMap(Map map1,
            Map map2, Map map3,
            Map map4, Map map5) {
        MutableQHashSeparateKVObjIntMapGO res = uninitializedMutableMap();
        res.move(this.newUpdatableMap(map1, map2, map3, map4, map5));
        return res;
    }



    @Override
    @Nonnull
    public 
     HashObjIntMap newMutableMap(
            Consumer> entriesSupplier
            ) {
        MutableQHashSeparateKVObjIntMapGO map = uninitializedMutableMap();
        map.move(this.newUpdatableMap(entriesSupplier));
        return map;
    }

    @Override
    @Nonnull
    public 
     HashObjIntMap newMutableMap(K2[] keys,
            int[] values) {
        MutableQHashSeparateKVObjIntMapGO map = uninitializedMutableMap();
        map.move(this.newUpdatableMap(keys, values));
        return map;
    }

    @Override
    @Nonnull
    public 
     HashObjIntMap newMutableMap(
            K2[] keys, Integer[] values) {
        MutableQHashSeparateKVObjIntMapGO map = uninitializedMutableMap();
        map.move(this.newUpdatableMap(keys, values));
        return map;
    }

    @Override
    @Nonnull
    public 
     HashObjIntMap newMutableMap(Iterable keys,
            Iterable values) {
        MutableQHashSeparateKVObjIntMapGO map = uninitializedMutableMap();
        map.move(this.newUpdatableMap(keys, values));
        return map;
    }


    @Override
    @Nonnull
    public 
     HashObjIntMap newMutableMapOf(K2 k1, int v1) {
        MutableQHashSeparateKVObjIntMapGO map = uninitializedMutableMap();
        map.move(this.newUpdatableMapOf(k1, v1));
        return map;
    }

    @Override
    @Nonnull
    public 
     HashObjIntMap newMutableMapOf(K2 k1, int v1,
             K2 k2, int v2) {
        MutableQHashSeparateKVObjIntMapGO map = uninitializedMutableMap();
        map.move(this.newUpdatableMapOf(k1, v1, k2, v2));
        return map;
    }

    @Override
    @Nonnull
    public 
     HashObjIntMap newMutableMapOf(K2 k1, int v1,
             K2 k2, int v2, K2 k3, int v3) {
        MutableQHashSeparateKVObjIntMapGO map = uninitializedMutableMap();
        map.move(this.newUpdatableMapOf(k1, v1, k2, v2, k3, v3));
        return map;
    }

    @Override
    @Nonnull
    public 
     HashObjIntMap newMutableMapOf(K2 k1, int v1,
             K2 k2, int v2, K2 k3, int v3,
             K2 k4, int v4) {
        MutableQHashSeparateKVObjIntMapGO map = uninitializedMutableMap();
        map.move(this.newUpdatableMapOf(k1, v1, k2, v2, k3, v3, k4, v4));
        return map;
    }

    @Override
    @Nonnull
    public 
     HashObjIntMap newMutableMapOf(K2 k1, int v1,
             K2 k2, int v2, K2 k3, int v3,
             K2 k4, int v4, K2 k5, int v5) {
        MutableQHashSeparateKVObjIntMapGO map = uninitializedMutableMap();
        map.move(this.newUpdatableMapOf(k1, v1, k2, v2, k3, v3, k4, v4, k5, v5));
        return map;
    }
    
    

    @Override
    @Nonnull
    public 
     HashObjIntMap newImmutableMap(
            Map map, int expectedSize) {
        ImmutableQHashSeparateKVObjIntMapGO res = uninitializedImmutableMap();
        res.move(this.newUpdatableMap(map, expectedSize));
        return res;
    }

    @Override
    @Nonnull
    public 
     HashObjIntMap newImmutableMap(Map map1,
            Map map2, int expectedSize) {
        ImmutableQHashSeparateKVObjIntMapGO res = uninitializedImmutableMap();
        res.move(this.newUpdatableMap(map1, map2, expectedSize));
        return res;
    }

    @Override
    @Nonnull
    public 
     HashObjIntMap newImmutableMap(Map map1,
            Map map2, Map map3, int expectedSize) {
        ImmutableQHashSeparateKVObjIntMapGO res = uninitializedImmutableMap();
        res.move(this.newUpdatableMap(map1, map2, map3, expectedSize));
        return res;
    }

    @Override
    @Nonnull
    public 
     HashObjIntMap newImmutableMap(Map map1,
            Map map2, Map map3,
            Map map4, int expectedSize) {
        ImmutableQHashSeparateKVObjIntMapGO res = uninitializedImmutableMap();
        res.move(this.newUpdatableMap(map1, map2, map3, map4, expectedSize));
        return res;
    }

    @Override
    @Nonnull
    public 
     HashObjIntMap newImmutableMap(Map map1,
            Map map2, Map map3,
            Map map4, Map map5, int expectedSize) {
        ImmutableQHashSeparateKVObjIntMapGO res = uninitializedImmutableMap();
        res.move(this.newUpdatableMap(map1, map2, map3, map4, map5, expectedSize));
        return res;
    }



    @Override
    @Nonnull
    public 
     HashObjIntMap newImmutableMap(
            Consumer> entriesSupplier
            , int expectedSize) {
        ImmutableQHashSeparateKVObjIntMapGO map = uninitializedImmutableMap();
        map.move(this.newUpdatableMap(entriesSupplier, expectedSize));
        return map;
    }

    @Override
    @Nonnull
    public 
     HashObjIntMap newImmutableMap(K2[] keys,
            int[] values, int expectedSize) {
        ImmutableQHashSeparateKVObjIntMapGO map = uninitializedImmutableMap();
        map.move(this.newUpdatableMap(keys, values, expectedSize));
        return map;
    }

    @Override
    @Nonnull
    public 
     HashObjIntMap newImmutableMap(
            K2[] keys, Integer[] values, int expectedSize) {
        ImmutableQHashSeparateKVObjIntMapGO map = uninitializedImmutableMap();
        map.move(this.newUpdatableMap(keys, values, expectedSize));
        return map;
    }

    @Override
    @Nonnull
    public 
     HashObjIntMap newImmutableMap(Iterable keys,
            Iterable values, int expectedSize) {
        ImmutableQHashSeparateKVObjIntMapGO map = uninitializedImmutableMap();
        map.move(this.newUpdatableMap(keys, values, expectedSize));
        return map;
    }

    
    

    @Override
    @Nonnull
    public 
     HashObjIntMap newImmutableMap(
            Map map) {
        ImmutableQHashSeparateKVObjIntMapGO res = uninitializedImmutableMap();
        res.move(this.newUpdatableMap(map));
        return res;
    }

    @Override
    @Nonnull
    public 
     HashObjIntMap newImmutableMap(Map map1,
            Map map2) {
        ImmutableQHashSeparateKVObjIntMapGO res = uninitializedImmutableMap();
        res.move(this.newUpdatableMap(map1, map2));
        return res;
    }

    @Override
    @Nonnull
    public 
     HashObjIntMap newImmutableMap(Map map1,
            Map map2, Map map3) {
        ImmutableQHashSeparateKVObjIntMapGO res = uninitializedImmutableMap();
        res.move(this.newUpdatableMap(map1, map2, map3));
        return res;
    }

    @Override
    @Nonnull
    public 
     HashObjIntMap newImmutableMap(Map map1,
            Map map2, Map map3,
            Map map4) {
        ImmutableQHashSeparateKVObjIntMapGO res = uninitializedImmutableMap();
        res.move(this.newUpdatableMap(map1, map2, map3, map4));
        return res;
    }

    @Override
    @Nonnull
    public 
     HashObjIntMap newImmutableMap(Map map1,
            Map map2, Map map3,
            Map map4, Map map5) {
        ImmutableQHashSeparateKVObjIntMapGO res = uninitializedImmutableMap();
        res.move(this.newUpdatableMap(map1, map2, map3, map4, map5));
        return res;
    }



    @Override
    @Nonnull
    public 
     HashObjIntMap newImmutableMap(
            Consumer> entriesSupplier
            ) {
        ImmutableQHashSeparateKVObjIntMapGO map = uninitializedImmutableMap();
        map.move(this.newUpdatableMap(entriesSupplier));
        return map;
    }

    @Override
    @Nonnull
    public 
     HashObjIntMap newImmutableMap(K2[] keys,
            int[] values) {
        ImmutableQHashSeparateKVObjIntMapGO map = uninitializedImmutableMap();
        map.move(this.newUpdatableMap(keys, values));
        return map;
    }

    @Override
    @Nonnull
    public 
     HashObjIntMap newImmutableMap(
            K2[] keys, Integer[] values) {
        ImmutableQHashSeparateKVObjIntMapGO map = uninitializedImmutableMap();
        map.move(this.newUpdatableMap(keys, values));
        return map;
    }

    @Override
    @Nonnull
    public 
     HashObjIntMap newImmutableMap(Iterable keys,
            Iterable values) {
        ImmutableQHashSeparateKVObjIntMapGO map = uninitializedImmutableMap();
        map.move(this.newUpdatableMap(keys, values));
        return map;
    }


    @Override
    @Nonnull
    public 
     HashObjIntMap newImmutableMapOf(K2 k1, int v1) {
        ImmutableQHashSeparateKVObjIntMapGO map = uninitializedImmutableMap();
        map.move(this.newUpdatableMapOf(k1, v1));
        return map;
    }

    @Override
    @Nonnull
    public 
     HashObjIntMap newImmutableMapOf(K2 k1, int v1,
             K2 k2, int v2) {
        ImmutableQHashSeparateKVObjIntMapGO map = uninitializedImmutableMap();
        map.move(this.newUpdatableMapOf(k1, v1, k2, v2));
        return map;
    }

    @Override
    @Nonnull
    public 
     HashObjIntMap newImmutableMapOf(K2 k1, int v1,
             K2 k2, int v2, K2 k3, int v3) {
        ImmutableQHashSeparateKVObjIntMapGO map = uninitializedImmutableMap();
        map.move(this.newUpdatableMapOf(k1, v1, k2, v2, k3, v3));
        return map;
    }

    @Override
    @Nonnull
    public 
     HashObjIntMap newImmutableMapOf(K2 k1, int v1,
             K2 k2, int v2, K2 k3, int v3,
             K2 k4, int v4) {
        ImmutableQHashSeparateKVObjIntMapGO map = uninitializedImmutableMap();
        map.move(this.newUpdatableMapOf(k1, v1, k2, v2, k3, v3, k4, v4));
        return map;
    }

    @Override
    @Nonnull
    public 
     HashObjIntMap newImmutableMapOf(K2 k1, int v1,
             K2 k2, int v2, K2 k3, int v3,
             K2 k4, int v4, K2 k5, int v5) {
        ImmutableQHashSeparateKVObjIntMapGO map = uninitializedImmutableMap();
        map.move(this.newUpdatableMapOf(k1, v1, k2, v2, k3, v3, k4, v4, k5, v5));
        return map;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy