
com.sampullara.util.ImmediateFuture Maven / Gradle / Ivy
The newest version!
package com.sampullara.util;
import com.google.common.util.concurrent.AbstractFuture;
import java.util.concurrent.Callable;
/**
* I know you want this done later, but I might as well do it right now.
*/
public class ImmediateFuture extends AbstractFuture {
public ImmediateFuture(Callable task) {
try {
set(task.call());
} catch (Exception e) {
setException(e);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy