Search in sources :

Example 1 with ConcurrentHashMapUnsafe

use of org.eclipse.collections.impl.map.mutable.ConcurrentHashMapUnsafe in project eclipse-collections by eclipse.

the class ConcurrentHashMapUnsafeTest method newWith.

@Override
public <T> MutableMap<Object, T> newWith(T... elements) {
    Random random = new Random(CURRENT_TIME_MILLIS);
    MutableMap<Object, T> result = new ConcurrentHashMapUnsafe<>();
    for (T each : elements) {
        assertNull(result.put(random.nextDouble(), each));
    }
    return result;
}
Also used : Random(java.util.Random) ConcurrentHashMapUnsafe(org.eclipse.collections.impl.map.mutable.ConcurrentHashMapUnsafe)

Aggregations

Random (java.util.Random)1 ConcurrentHashMapUnsafe (org.eclipse.collections.impl.map.mutable.ConcurrentHashMapUnsafe)1