Code example for Function

Methods: apply

0
        this(target, null);
    } 
 
    protected T map(Exception e) {
        if (f != null) {
            T res = f.apply(e);
            this.done = isClosed();
            return res;
        } 
        throw new UnsupportedOperationException();
    } 
 
    @Override 
    @SuppressWarnings("empty-statement") 
    public T receive() throws SuspendExecution, InterruptedException {
        try { 
            return target.receive(); 
        } catch (InterruptedException e) {
            throw e;
        } catch (Exception e) {