Java AtomicInteger increase(A a, Map map)

Here you can find the source of increase(A a, Map map)

Description

increase

License

Apache License

Declaration

public static <A> void increase(A a, Map<A, AtomicInteger> map) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.Map;

import java.util.concurrent.atomic.AtomicInteger;

public class Main {
    public static <A> void increase(A a, Map<A, AtomicInteger> map) {
        AtomicInteger val = map.get(a);
        if (val == null) {
            val = new AtomicInteger(1);
            map.put(a, val);
        } else {/*from w  w  w. j a  v a2s .com*/
            val.addAndGet(1);
        }
    }
}

Related

  1. getThreadDumpId()
  2. getThreadName(String pattern, String name)
  3. getTimeBasedUUID()
  4. getUniqueId()
  5. getUuidAsFourCharacterGroups()
  6. isPropBlocked(String s)
  7. loadServiceCount(String id)
  8. print2DIntArray(int[][] array)
  9. printResults(Stream> resultPartitionsStream)