nz.sodium.LazyCell Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sodium Show documentation
Show all versions of sodium Show documentation
A Functional Reactive Programming (FRP) system for Java
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