Java AtomicInteger encodeMap(Map map)

Here you can find the source of encodeMap(Map map)

Description

encode Map

License

Open Source License

Declaration

public static String[] encodeMap(Map<String, String> map) 

Method Source Code

    //package com.java2s;

    import java.util.Map;
    import java.util.concurrent.atomic.AtomicInteger;

    public class Main {
        public static String[] encodeMap(Map<String, String> map) {
    String[] array = new String[map.size()];
    AtomicInteger integer = new AtomicInteger(0);

    map.forEach((key, value) -> array[integer.getAndIncrement()] = key + "-" + value);

    return array;
}
    }//from   w  w  w.ja  v a  2 s  .co m

Related

  1. createThreadFactory(final String prefix)
  2. decrementStoredNoOfParts()
  3. decrementVxlanGpeRefCnt(final String vxlanGpePortKey, final String vppNode)
  4. decrementWheelsCount()
  5. deleteIndexedFields(Set fieldsToDelete, List fields, Map fieldIndexLookupMap)
  6. generateUniqueId()
  7. getAllocationFailureCount()
  8. getAndResetInvocationCount()
  9. getAndResetInvocationCount()