public final class Result
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
Result |
addArg(Arg<?> a)
Adds an argument to this result.
|
fj.data.Option<fj.data.List<Arg<?>>> |
args()
Returns the potential arguments associated with this result.
|
fj.data.Option<java.lang.Throwable> |
exception()
Returns the potential exception associated with this result.
|
static Result |
exception(fj.data.List<Arg<?>> args,
java.lang.Throwable t)
Returns an exception result.
|
boolean |
failed()
Returns
true if this result is falsified or an exception; otherwise,
false. |
static Result |
falsified(fj.data.List<Arg<?>> args)
Returns a falsified result.
|
boolean |
isException()
Returns
true if this result is an exception; otherwise, false. |
boolean |
isFalsified()
Returns
true if this result is falsified; otherwise, false. |
boolean |
isNoResult()
Returns
true if this result is no result; otherwise, false. |
boolean |
isProven()
Returns
true if this result is proven; otherwise, false. |
boolean |
isUnfalsified()
Returns
true if this result is unfalsified; otherwise, false. |
static Result |
noResult()
Returns a result representing no result.
|
static Result |
noResult(fj.data.Option<Result> r)
Returns a result from the given potential result.
|
boolean |
passed()
Returns
true if this result is unfalsified or proven; otherwise,
false. |
static Result |
proven(fj.data.List<Arg<?>> args)
Returns a proven result.
|
Result |
provenAsUnfalsified()
If this result is proven, alter it to be unfalsified with the same arguments; otherwise, return
this. |
fj.data.Option<Result> |
toOption()
Returns a potential result for this result.
|
static Result |
unfalsified(fj.data.List<Arg<?>> args)
Returns an unfalsified result.
|
public fj.data.Option<fj.data.List<Arg<?>>> args()
!noResult() holds.public fj.data.Option<java.lang.Throwable> exception()
public boolean isUnfalsified()
true if this result is unfalsified; otherwise, false.true if this result is unfalsified; otherwise, false.public boolean isFalsified()
true if this result is falsified; otherwise, false.true if this result is falsified; otherwise, false.public boolean isProven()
true if this result is proven; otherwise, false.true if this result is proven; otherwise, false.public boolean isException()
true if this result is an exception; otherwise, false.true if this result is an exception; otherwise, false.public boolean isNoResult()
true if this result is no result; otherwise, false.true if this result is no result; otherwise, false.public boolean failed()
true if this result is falsified or an exception; otherwise,
false.true if this result is falsified or an exception; otherwise,
false.public boolean passed()
true if this result is unfalsified or proven; otherwise,
false.true if this result is unfalsified or proven; otherwise,
false.public Result provenAsUnfalsified()
this.this.public Result addArg(Arg<?> a)
a - The argument to add.public fj.data.Option<Result> toOption()
!noResult().public static Result noResult(fj.data.Option<Result> r)
r - The potential result.noResult().public static Result noResult()
public static Result unfalsified(fj.data.List<Arg<?>> args)
args - The arguments used during the failure of falsification.public static Result falsified(fj.data.List<Arg<?>> args)
args - The arguments used during falsification.public static Result proven(fj.data.List<Arg<?>> args)
args - The arguments used during proof.