Code example for Closer

Methods: register

0
     * 
     * @return the given {@code closeable} 
     */ 
    protected <C extends Closeable> C autoclose(C closeable)
    { 
        return _closer.register(closeable);
    } 
 
    /** 
     * Registers the given {@code cancellable}. When this tempalte is cancelled so is {@code cancellable}. 
     * 
     * @throws IllegalStateException if called more than once 
     */ 
    protected void setCancellable(Cancellable cancellable)
    { 
        checkState(_cancellable == null);
        _cancellable = checkNotNull(cancellable);
    } 
 
    /** 
Connect your IDE to all the code out there  Get Codota for Java