Example usage for java.util.concurrent ConcurrentHashMap toString

List of usage examples for java.util.concurrent ConcurrentHashMap toString

Introduction

In this page you can find the example usage for java.util.concurrent ConcurrentHashMap toString.

Prototype

public String toString() 

Source Link

Document

Returns a string representation of this map.

Usage

From source file:unitTests.dataspaces.VFSMountManagerHelperTest.java

/**
 * - Insert a valid file vfs root and a valid proactive vfs root in the list of fake uris
 * - verifies that mountAny returns the file system corresponding to the valid uri
 * - do that for all valid uris of the file system server
 * @throws Exception/*from  ww  w .  j ava  2 s  . co  m*/
 */
@Test
public void testMountAnyOk() throws Exception {
    logger.info("*************** testMountAnyOk");
    String[] validUris = server.getVFSRootURLs();

    for (String validUrl : validUris) {
        ConcurrentHashMap<String, FileObject> fileSystems = new ConcurrentHashMap<String, FileObject>();
        ArrayList<String> uriToMount = new ArrayList<String>(fakeFileUrls);
        uriToMount.add(spacesDir.toURI().toString()); // adds a valid file uri
        uriToMount.addAll(fakeUrls);
        uriToMount.add((int) Math.floor(Math.random() * uriToMount.size()), validUrl);
        VFSMountManagerHelper.mountAny(uriToMount, fileSystems);
        logger.info("Content of map : " + fileSystems.toString());
        Assert.assertTrue("map contains valid Url", fileSystems.containsKey(validUrl));
    }
}

From source file:com.gizwits.smartlight.activity.MainListActivity.java

@Override
protected void didReceiveData(XPGWifiDevice device, ConcurrentHashMap<String, Object> dataMap, int result) {

    subDevice = (XPGWifiSubDevice) device;
    deviceDataMap = dataMap;//from  w w  w.j  a  v  a 2s  . co  m
    Log.i(TAG, "subDevice didReceiveData:" + dataMap.toString() + subDevice.getSubProductKey());
    handler.sendEmptyMessage(handler_key.RECEIVED.ordinal());

}