Package xbird.util.collections.ints

Examples of xbird.util.collections.ints.Int2IntHash$BucketEntry


        super(name);
    }

    public void testPut() {
        IntArrayList keys = new IntArrayList(100000);
        Int2IntHash hash = new Int2IntHash(100000);
        Random random = new Random(System.currentTimeMillis());
        for(int i = 0; i < 100000; i++) {
            int key = random.nextInt();
            keys.add(key);
            int value = random.nextInt();
            hash.put(key, value);
        }
        Int2IntHash copyed = ObjectUtils.deepCopy(hash);
        assert (hash.size() == copyed.size());
        for(int i = 0; i < 100000; i++) {
            int key = keys.get(i);
            assertEquals(hash.get(key), copyed.get(key));
        }
    }
View Full Code Here

TOP

Related Classes of xbird.util.collections.ints.Int2IntHash$BucketEntry

Copyright © 2018 www.massapicom. 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.