Package net.openhft.koloboke.collect.impl.hash

Examples of net.openhft.koloboke.collect.impl.hash.SeparateKVByteIntDHash.capacity()


        ByteIntMap map;
        SeparateKVByteIntDHash asDHash;
        for (int i = 0; ; i++) {
            map = factory.newMutableMap(i);
            asDHash = (SeparateKVByteIntDHash) map;
            if (asDHash.capacity() > 128) {
                break;
            }
        }

        int capacity = asDHash.capacity();
View Full Code Here


            if (asDHash.capacity() > 128) {
                break;
            }
        }

        int capacity = asDHash.capacity();
        assertEquals(capacity - 1, ((MutableDHash) map).maxSize());
        assertTrue(asDHash.freeValue() == 0 && asDHash.removedValue() == 1 ||
                asDHash.freeValue() == 1 && asDHash.removedValue() == 0);

        for (int i = 2; i < capacity; i++) {
View Full Code Here

            map.put((byte) i, 0);
        }

        assertTrue(asDHash.freeValue() == 0 && asDHash.removedValue() == 1 ||
                asDHash.freeValue() == 1 && asDHash.removedValue() == 0);
        assertEquals(capacity, asDHash.capacity());

        map.put((byte) 0, 0);

        assertEquals(capacity, asDHash.capacity());
        assertEquals(capacity - 1, sizeByValueIterator(map));
View Full Code Here

                asDHash.freeValue() == 1 && asDHash.removedValue() == 0);
        assertEquals(capacity, asDHash.capacity());

        map.put((byte) 0, 0);

        assertEquals(capacity, asDHash.capacity());
        assertEquals(capacity - 1, sizeByValueIterator(map));
        assertTrue(asDHash.freeValue() != 0 && asDHash.removedValue() == 1 ||
                asDHash.freeValue() == 1 && asDHash.removedValue() != 0);
        assertTrue(map.containsKey((byte) 0));
        assertFalse(map.containsKey((byte) 1));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.