public static <T> T computeIfAbsent(StateHelper stateHelper, Serializable key, Supplier<T> defaultValueSupplier) {
        T value = (T) stateHelper.get(key);
        if (value == null) {
            value = defaultValueSupplier.get();
            stateHelper.put(key, value);
        }
        return value;
    }
Tries to retrieve value from stateHelper by key first. If the value is not present (or is null),
then it is retrieved from defaultValueSupplier.

Should be removed when {@link StateHelper} is extended with similar functionality.
(see https://github.com/jakartaee/faces/issues/2024 for details)
@param stateHelper The stateHelper to try to retrieve value from
@param key The key under which value is stored in the stateHelper
@param defaultValueSupplier The object, from which default value is retrieved
@param <T> the expected type of returned value
@return value from stateHelper or defaultValueSupplier
primefaces/src/main/java/org/primefaces/util/ComponentUtils.java