F - The type of values returned upon failure.S - The type of values returned upon success.@EqualityStructural public final class Failure<F,S> extends Object implements TryType<F,S>
A computation that has failed.
TryType,
Serialized Form| Modifier and Type | Method and Description |
|---|---|
<U> U |
accept(TryVisitorType<F,S,U> v)
Accept a visitor.
|
<U,E extends Throwable> |
acceptPartial(TryPartialVisitorType<F,S,U,E> v)
Accept a partial visitor.
|
boolean |
equals(Object obj) |
static <F,S> Failure<F,S> |
failure(F x)
Produce a new failure value.
|
F |
get() |
int |
hashCode() |
String |
toString() |
public static <F,S> Failure<F,S> failure(F x)
F - The type of values returned upon failure.S - The type of values returned upon success.x - The actual valuepublic <U> U accept(TryVisitorType<F,S,U> v)
TryTypepublic <U,E extends Throwable> U acceptPartial(TryPartialVisitorType<F,S,U,E> v) throws E extends Throwable
TryTypeacceptPartial in interface TryType<F,S>U - The type of values returned by the visitor.E - The type of exceptions thrown by the visitor.v - The visitorE - If the visitor throws E.E extends Throwablepublic F get()
Copyright © 2017 <code@io7m.com> http://io7m.com