Code example for Future

Methods: isDone

0
	public final void setFuture(Future<?> future) {
		this.future = future;
	} 
	 
	public final boolean isDone() { 
		return (this.future != null) ? this.future.isDone() : false;
	} 
	 
	public final void printException() { 
		if (this.future != null) {
			try { 
				this.future.get();
			} catch (ExecutionException e) {
				Throwable rootException = e.getCause();
				rootException.printStackTrace();
			} catch (Exception e) {
				e.printStackTrace();
			} 
		} 
	} 
Stop searching for code, let great code find you!  Add Codota to your java IDE