// Path: src/main/java/tests/maptests/IMapTest.java
// public interface IMapTest {
//     public void setup( final int[] keys, final float fillFactor, final int oneFailureOutOf );
// 
//     public int test();
// }
// 
// Path: src/main/java/tests/maptests/ITestSet.java
// public interface ITestSet {
//     public IMapTest getTest();
//     public IMapTest putTest();
//     public IMapTest removeTest();
// }
// 
// Path: src/main/java/tests/maptests/primitive/AbstractPrimPrimGetTest.java
// public abstract class AbstractPrimPrimGetTest implements IMapTest {
//     protected int[] m_keys;
// 
//     @Override
//     public void setup(final int[] keys, final float fillFactor, final int oneFailOutOf ) {
//         m_keys = keys;
//     }
// }
// 
// Path: src/main/java/tests/maptests/primitive/AbstractPrimPrimPutTest.java
// public abstract class AbstractPrimPrimPutTest implements IMapTest {
//     protected int[] m_keys;
// 	protected float m_fillFactor;
// 
//     @Override
//     public void setup(final int[] keys, final float fillFactor, final int oneFailOutOf ) {
//     	m_fillFactor = fillFactor;
//         m_keys = keys;
//     }
// }


import com.koloboke.collect.hash.HashConfig;
import com.koloboke.collect.map.hash.HashIntObjMap;
import com.koloboke.collect.map.hash.HashIntObjMaps;
import tests.maptests.IMapTest;
import tests.maptests.ITestSet;
import tests.maptests.primitive.AbstractPrimPrimGetTest;
import tests.maptests.primitive.AbstractPrimPrimPutTest;

    @Override
    public IMapTest removeTest() {
        return new KolobokeIntObjectRemoveTest();
    }

    private static <T> HashIntObjMap<T> makeMap(final int size, final float fillFactor )
    {
        return HashIntObjMaps.getDefaultFactory().withHashConfig(HashConfig.fromLoads( fillFactor/2, fillFactor, fillFactor)).newMutableMap( size );
    }

    private static class KolobokeIntObjectGetTest extends AbstractPrimPrimGetTest {
        private HashIntObjMap<Integer> m_map;

        @Override
        public void setup(final int[] keys, float fillFactor, int oneFailOutOf) {
            super.setup( keys, fillFactor, oneFailOutOf);
            m_map = makeMap( keys.length, fillFactor );
            for (int key : keys) m_map.put(key % oneFailOutOf == 0 ? key + 1 : key, Integer.valueOf(key));
        }

        @Override
        public int test() {
            int res = 0;
            for ( int i = 0; i < m_keys.length; ++i )
                if ( m_map.get( m_keys[ i ] ) != null ) res ^= 1;
            return res;
        }
    }

// Path: src/main/java/tests/maptests/IMapTest.java
// public interface IMapTest {
//     public void setup( final int[] keys, final float fillFactor, final int oneFailureOutOf );
// 
//     public int test();
// }
// 
// Path: src/main/java/tests/maptests/ITestSet.java
// public interface ITestSet {
//     public IMapTest getTest();
//     public IMapTest putTest();
//     public IMapTest removeTest();
// }
// 
// Path: src/main/java/tests/maptests/primitive/AbstractPrimPrimGetTest.java
// public abstract class AbstractPrimPrimGetTest implements IMapTest {
//     protected int[] m_keys;
// 
//     @Override
//     public void setup(final int[] keys, final float fillFactor, final int oneFailOutOf ) {
//         m_keys = keys;
//     }
// }
// 
// Path: src/main/java/tests/maptests/primitive/AbstractPrimPrimPutTest.java
// public abstract class AbstractPrimPrimPutTest implements IMapTest {
//     protected int[] m_keys;
// 	protected float m_fillFactor;
// 
//     @Override
//     public void setup(final int[] keys, final float fillFactor, final int oneFailOutOf ) {
//     	m_fillFactor = fillFactor;
//         m_keys = keys;
//     }
// }


// Path: src/main/java/tests/maptests/prim_object/KolobokeIntObjectMapTest.java
import com.koloboke.collect.hash.HashConfig;
import com.koloboke.collect.map.hash.HashIntObjMap;
import com.koloboke.collect.map.hash.HashIntObjMaps;
import tests.maptests.IMapTest;
import tests.maptests.ITestSet;
import tests.maptests.primitive.AbstractPrimPrimGetTest;
import tests.maptests.primitive.AbstractPrimPrimPutTest;


    @Override
    public IMapTest removeTest() {
        return new KolobokeIntObjectRemoveTest();
    }

    private static <T> HashIntObjMap<T> makeMap(final int size, final float fillFactor )
    {
        return HashIntObjMaps.getDefaultFactory().withHashConfig(HashConfig.fromLoads( fillFactor/2, fillFactor, fillFactor)).newMutableMap( size );
    }

    private static class KolobokeIntObjectGetTest extends AbstractPrimPrimGetTest {
        private HashIntObjMap<Integer> m_map;

        @Override
        public void setup(final int[] keys, float fillFactor, int oneFailOutOf) {
            super.setup( keys, fillFactor, oneFailOutOf);
            m_map = makeMap( keys.length, fillFactor );
            for (int key : keys) m_map.put(key % oneFailOutOf == 0 ? key + 1 : key, Integer.valueOf(key));
        }

        @Override
        public int test() {
            int res = 0;
            for ( int i = 0; i < m_keys.length; ++i )
                if ( m_map.get( m_keys[ i ] ) != null ) res ^= 1;
            return res;
        }
    }

    private static class KolobokeIntObjectPutTest extends AbstractPrimPrimPutTest {