@Override
    public T get() {
        T result = value;

        if (result == NOT_INITIALIZED) {
            synchronized (this) {
                result = value;
                if (result == NOT_INITIALIZED) {
                    value = init.get();
                    result = value;
                }
            }
        }

        return result;
    }
Inspired by commons-lang LazyInitializer.

@param <T> The type to be lazy initialized.
primefaces/src/main/java/org/primefaces/util/Lazy.java