cz.cuni.amis.utils
Class ExceptionDiscarder<T>

Package class diagram package ExceptionDiscarder
java.lang.Object
  extended by 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

Constructor Summary
ExceptionDiscarder()
           
 
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
 

Constructor Detail

ExceptionDiscarder

public ExceptionDiscarder()
Method Detail

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 © 2015 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.