Created
March 4, 2015 12:04
-
-
Save fge/2c3b7eef9ea1cca72cc3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.github.fge.lambdas; | |
| public abstract class Chain<N, T extends N, C extends Chain<N, T, C>> | |
| { | |
| protected final T throwing; | |
| protected Chain(final T throwing) | |
| { | |
| this.throwing = throwing; | |
| } | |
| public abstract C orTryWith(T other); | |
| public abstract <E extends RuntimeException> T orThrow(Class<E> exclass); | |
| public abstract N fallbackTo(N fallback); | |
| @Deprecated | |
| public final <E extends RuntimeException> T as(final Class<E> exclass) | |
| { | |
| return orThrow(exclass); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment