All Downloads are FREE. Search and download functionalities are using the official Maven repository.

nz.sodium.LazyCell Maven / Gradle / Ivy

The newest version!
package nz.sodium;

class LazyCell extends Cell {
    LazyCell(final Stream event, final Lazy lazyInitValue) {
        super(event, null);
        this.lazyInitValue = lazyInitValue;
    }

    @Override
    A sampleNoTrans()
    {
        if (value == null && lazyInitValue != null) {
            value = lazyInitValue.get();
            lazyInitValue = null;
        }
        return value;
    }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy