Code example for Function

Methods: apply

0
            @Override 
            public V get(Object keyObj) { 
                V value = super.get(keyObj);
                if (value == null) {
                    K key = (K)keyObj;
                    value = creator.apply(key);
                    final V existingValue = super.putIfAbsent(key, value);
                    if (existingValue != null) {
                        value = existingValue;
                    } 
                } 
                return value;
            } 
        }; 
    } 
}