Java HashMap to String toStringLong(HashMap map)

Here you can find the source of toStringLong(HashMap map)

Description

to String Long

License

Open Source License

Declaration

public static String toStringLong(HashMap<Long, Long> map) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.HashMap;

import java.util.Map;

public class Main {
    public static String toStringLong(HashMap<Long, Long> map) {
        String display = "[";
        for (Map.Entry<Long, Long> entry : map.entrySet()) {
            display += entry.getKey() + " : " + entry.getValue() + ", ";
        }/*w w w  . j ava2s  . com*/
        display = display.substring(0, display.length() - 2) + "]";
        return display;
    }
}

Related

  1. toString(HashMap map)
  2. toStringArray(HashMap syms)