Example usage for org.apache.commons.collections.map CaseInsensitiveMap getClass

List of usage examples for org.apache.commons.collections.map CaseInsensitiveMap getClass

Introduction

In this page you can find the example usage for org.apache.commons.collections.map CaseInsensitiveMap getClass.

Prototype

@HotSpotIntrinsicCandidate
public final native Class<?> getClass();

Source Link

Document

Returns the runtime class of this Object .

Usage

From source file:de.hybris.platform.test.CaseInsensitiveStringMapTest.java

@Test
public void testReadPerformance() {
    final int size = 1000;
    final int gets = 10 * 1000 * size;
    final List<String> keys = generateKeys(size);
    final List<String> keysCaseShuffled = shuffleCase(keys);
    final long seed = System.nanoTime();

    final CaseInsensitiveMap map1 = new CaseInsensitiveMap(size);
    fillMap(map1, keys);/*from  w  w  w. j  a  v  a2s.c o  m*/

    final long time1 = testReadPerformance(keysCaseShuffled, map1, gets, seed);
    writeResults(1, gets, time1, map1.getClass().toString());

    final CaseInsensitiveStringMap<String> map2 = new CaseInsensitiveStringMap<String>(size);
    fillMap(map2, keys);

    final long time2 = testReadPerformance(keysCaseShuffled, map2, gets, seed);
    writeResults(1, gets, time2, map2.getClass().toString());
}