@Override
    public final T get() {
        T val = this.value;

        // double checked locking
        if (val == null) {
            synchronized (this) {
                val = this.value;
                if (val == null) {
                    val = this.supplier.get();
                    this.value = val;
                }
            }
        }

        return val;
    }
A cached supplier extension.

<p>The delegate supplier is only called on executions of {@link #get()} if the
result is not cached. Subsequent calls will block until the value is calculated.</p>

@param <T> the supplied type
helper/src/main/java/me/lucko/helper/cache/Cache.java