// 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/object_prim/AbstractObjKeyGetTest.java
// public abstract class AbstractObjKeyGetTest implements IMapTest {
//     protected Integer[] m_keys;
// 
//     @Override
//     public void setup(final int[] keys, final float fillFactor, final int oneFailureOutOf ) {
//         m_keys = new Integer[ keys.length ];
//         for ( int i = 0; i < keys.length; ++i )
//             m_keys[ i ] = new Integer( keys[ i ] );
//     }
// }
// 
// Path: src/main/java/tests/maptests/object_prim/AbstractObjKeyPutTest.java
// public abstract class AbstractObjKeyPutTest implements IMapTest {
//     protected Integer[] m_keys;
//     protected Integer[] m_keys2;
// 	protected float m_fillFactor;
// 
//     @Override
//     public void setup(final int[] keys, final float fillFactor, final int oneFailOutOf) {
//     	m_fillFactor = fillFactor;
//         m_keys = new Integer[ keys.length ];
//         for ( int i = 0; i < keys.length; ++i )
//             m_keys[ i ] = new Integer( keys[ i ] );
//         m_keys2 = new Integer[ keys.length ];
//         for ( int i = 0; i < keys.length; ++i )
//             m_keys2[ i ] = new Integer( keys[ i ] );
//     }
// }


import com.carrotsearch.hppc.ObjectObjectMap;
import com.carrotsearch.hppc.ObjectObjectHashMap;
import tests.maptests.IMapTest;
import tests.maptests.ITestSet;
import tests.maptests.object_prim.AbstractObjKeyGetTest;
import tests.maptests.object_prim.AbstractObjKeyPutTest;
    @Override
    public IMapTest putTest() {
        return new HppcObjMapPutTest();
    }

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

    private static class HppcObjMapGetTest extends AbstractObjKeyGetTest {
        private ObjectObjectMap<Integer, Integer> m_map;

        @Override
        public void setup(final int[] keys, final float fillFactor, final int oneFailureOutOf ) {
            super.setup( keys, fillFactor, oneFailureOutOf );
            m_map = new ObjectObjectHashMap<>( keys.length, fillFactor );
            for (Integer key : m_keys)
                m_map.put(new Integer( key % oneFailureOutOf == 0 ? key + 1 : key ), 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/object_prim/AbstractObjKeyGetTest.java
// public abstract class AbstractObjKeyGetTest implements IMapTest {
//     protected Integer[] m_keys;
// 
//     @Override
//     public void setup(final int[] keys, final float fillFactor, final int oneFailureOutOf ) {
//         m_keys = new Integer[ keys.length ];
//         for ( int i = 0; i < keys.length; ++i )
//             m_keys[ i ] = new Integer( keys[ i ] );
//     }
// }
// 
// Path: src/main/java/tests/maptests/object_prim/AbstractObjKeyPutTest.java
// public abstract class AbstractObjKeyPutTest implements IMapTest {
//     protected Integer[] m_keys;
//     protected Integer[] m_keys2;
// 	protected float m_fillFactor;
// 
//     @Override
//     public void setup(final int[] keys, final float fillFactor, final int oneFailOutOf) {
//     	m_fillFactor = fillFactor;
//         m_keys = new Integer[ keys.length ];
//         for ( int i = 0; i < keys.length; ++i )
//             m_keys[ i ] = new Integer( keys[ i ] );
//         m_keys2 = new Integer[ keys.length ];
//         for ( int i = 0; i < keys.length; ++i )
//             m_keys2[ i ] = new Integer( keys[ i ] );
//     }
// }


// Path: src/main/java/tests/maptests/object/HppcObjMapTest.java
import com.carrotsearch.hppc.ObjectObjectMap;
import com.carrotsearch.hppc.ObjectObjectHashMap;
import tests.maptests.IMapTest;
import tests.maptests.ITestSet;
import tests.maptests.object_prim.AbstractObjKeyGetTest;
import tests.maptests.object_prim.AbstractObjKeyPutTest;

    @Override
    public IMapTest putTest() {
        return new HppcObjMapPutTest();
    }

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

    private static class HppcObjMapGetTest extends AbstractObjKeyGetTest {
        private ObjectObjectMap<Integer, Integer> m_map;

        @Override
        public void setup(final int[] keys, final float fillFactor, final int oneFailureOutOf ) {
            super.setup( keys, fillFactor, oneFailureOutOf );
            m_map = new ObjectObjectHashMap<>( keys.length, fillFactor );
            for (Integer key : m_keys)
                m_map.put(new Integer( key % oneFailureOutOf == 0 ? key + 1 : key ), 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 HppcObjMapPutTest extends AbstractObjKeyPutTest {