cz.cuni.amis.utils
Class ExceptionDiscarder<T>
java.lang.Object
cz.cuni.amis.utils.ExceptionDiscarder<T>
public abstract class ExceptionDiscarder<T>
- extends Object
Used for adapting APIs throwing exceptions to usecases where this is not desired.
- Author:
- ik
Method Summary |
T |
run()
|
protected abstract T |
task()
Specifies the task that should be computed. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExceptionDiscarder
public ExceptionDiscarder()
task
protected abstract T task()
throws Exception
- Specifies the task that should be computed. the task can throw exception but
it will be wrapped by run method to a RuntimeException.
- Returns:
-
- Throws:
Exception
run
public T run()
Copyright © 2014 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.