@Test(expected = NullPointerException.class) public void leftValueCannotBeNull() { Try.<Integer, Exception>success(null); }
@SuppressWarnings("unchecked") public static <S, T extends Throwable> Try<S, T> success(@Nonnull S result) { return (Try<S, T>) new Try(checkNotNull(result, "result"), false); }
Try { @SuppressWarnings("unchecked") public static <S, T extends Throwable> Try<S, T> success(@Nonnull S result) { return (Try<S, T>) new Try(checkNotNull(result, "result"), false); } }
Try { @SuppressWarnings("unchecked") public static <S, T extends Throwable> Try<S, T> success(@Nonnull S result) { return (Try<S, T>) new Try(checkNotNull(result, "result"), false); } private  Try(Object value, boolean failed); }
Try { @SuppressWarnings("unchecked") public static <S, T extends Throwable> Try<S, T> success(@Nonnull S result) { return (Try<S, T>) new Try(checkNotNull(result, "result"), false); } private  Try(Object value, boolean failed); @SuppressWarnings("unchecked") static Try<S, T> success(@Nonnull S result); @SuppressWarnings("unchecked") static Try<S, T> failure(@Nonnull T cause); boolean isSuccess(); boolean isFailure(); @SuppressWarnings("unchecked") S getSuccess(); @SuppressWarnings("unchecked") T getFailure(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); }
Try { @SuppressWarnings("unchecked") public static <S, T extends Throwable> Try<S, T> success(@Nonnull S result) { return (Try<S, T>) new Try(checkNotNull(result, "result"), false); } private  Try(Object value, boolean failed); @SuppressWarnings("unchecked") static Try<S, T> success(@Nonnull S result); @SuppressWarnings("unchecked") static Try<S, T> failure(@Nonnull T cause); boolean isSuccess(); boolean isFailure(); @SuppressWarnings("unchecked") S getSuccess(); @SuppressWarnings("unchecked") T getFailure(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }