class MapMethodsSupport {

    private MapMethodsSupport() {
    }

    static <V> void returnCurrentValueIfPresent(
            MapQueryContext<?, V, ?> q, ReturnValue<V> returnValue) {<FILL_FUNCTION_BODY>}

    static <V> boolean tryReturnCurrentValueIfPresent(
            MapQueryContext<?, V, ?> q, ReturnValue<V> returnValue) {
        if (q.readLock().tryLock()) {
            MapEntry<?, V> entry = q.entry();
            if (entry != null) {
                returnValue.returnValue(entry.value());
                return true;
            }
            // Key is absent
            q.readLock().unlock();
        }
        q.updateLock().lock();
        MapEntry<?, V> entry = q.entry();
        if (entry != null) {
            returnValue.returnValue(entry.value());
            return true;
        }
        return false;
    }
}

        MapEntry<?, V> entry = q.entry();
        if (entry != null)
            returnValue.returnValue(entry.value());
    
<no_super_class>