delight.async.Value Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of delight-async Show documentation
Show all versions of delight-async Show documentation
Asynchronous utilities for Java and GWT applications. Includes a simple promise implementation for Java.
package delight.async;
public class Value {
private T value;
public synchronized T get() {
return value;
}
public synchronized Value set(final T value) {
this.value = value;
return this;
}
public Value(final T value) {
super();
this.value = value;
}
@Override
public String toString() {
return "[(" + value + ") wrapped in (" + super.toString() + ")]";
}
}