R
- The type of the result.public static class DataResult.PartialResult<R> extends Object
DataResult
.Constructor and Description |
---|
PartialResult(String message,
Optional<R> partialResult)
Constructs a new
DataResult.PartialResult with the given message and optional result. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
<R2> DataResult.PartialResult<R2> |
flatMap((R) -> DataResult.PartialResult<R2> function)
Applies the given function to the result stored in this
DataResult.PartialResult , flattening
nested DataResult.PartialResult wrappers. |
int |
hashCode() |
<R2> DataResult.PartialResult<R2> |
map((? super R) -> ? extends R2 function)
Applies the given function to the result stored in this
DataResult.PartialResult . |
String |
message()
Returns the error message.
|
String |
toString()
Returns a
String describing this DataResult.PartialResult . |
public PartialResult(String message, Optional<R> partialResult)
DataResult.PartialResult
with the given message and optional result.message
- The error message.partialResult
- The result.public <R2> DataResult.PartialResult<R2> map((? super R) -> ? extends R2 function)
DataResult.PartialResult
.DataResult.PartialResult
.R2
- The new result type.function
- The function to apply.DataResult.PartialResult
with the given function applied.public <R2> DataResult.PartialResult<R2> flatMap((R) -> DataResult.PartialResult<R2> function)
DataResult.PartialResult
, flattening
nested DataResult.PartialResult
wrappers.DataResult.PartialResult
.R2
- The new result type.function
- The function to apply.DataResult.PartialResult
with the given function applied.public String message()
public String toString()
String
describing this DataResult.PartialResult
.