Equivalent of ComputeIfAbsent in Java 7
<p>Is there a way to run a piece of code only if the key doesn't exist in a <code>ConcurrentHashMap</code>, and save the code's result to the collection?</p>

<p>I can't use <strong>Java 8</strong> features because I'm developing for Android.</p>

<p>Also, I would like to avoid running long operations if I don't have to and I don't want to break the collection's atomic operation to do so.</p>