public static final class OrderCompletionReport.OrderLineCompletion extends Object
OrderLine
.Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
static OrderCompletionReport.OrderLineCompletion |
error(OrderLine orderLine,
String message)
Creates an
OrderCompletionReport.OrderLineCompletion representing an erroneous OrderLine alongside an error message. |
@NonNull Optional<String> |
getMessage() |
@NonNull OrderLine |
getOrderLine() |
@NonNull OrderCompletionReport.CompletionStatus |
getStatus() |
int |
hashCode() |
boolean |
isFailure()
Returns whether the
OrderCompletionReport.OrderLineCompletion represents a failure. |
OrderCompletionReport.OrderLineCompletion |
onSuccess(Consumer<OrderLine> action)
Applies the given
Consumer in case the OrderCompletionReport.OrderLineCompletion is successful. |
static OrderCompletionReport.OrderLineCompletion |
success(OrderLine orderLine)
Creates an
OrderCompletionReport.OrderLineCompletion representing the successful completion of an OrderLine . |
String |
toString() |
public static OrderCompletionReport.OrderLineCompletion success(OrderLine orderLine)
OrderCompletionReport.OrderLineCompletion
representing the successful completion of an OrderLine
.orderLine
- must not be null.public static OrderCompletionReport.OrderLineCompletion error(OrderLine orderLine, String message)
OrderCompletionReport.OrderLineCompletion
representing an erroneous OrderLine
alongside an error message.orderLine
- must not be null.message
- must not be null.public boolean isFailure()
OrderCompletionReport.OrderLineCompletion
represents a failure.public OrderCompletionReport.OrderLineCompletion onSuccess(Consumer<OrderLine> action)
Consumer
in case the OrderCompletionReport.OrderLineCompletion
is successful.action
- must not be null.OrderCompletionReport.OrderLineCompletion
.@NonNull public @NonNull OrderLine getOrderLine()
@NonNull public @NonNull OrderCompletionReport.CompletionStatus getStatus()
Copyright © 2019. All rights reserved.