public final class ErrorOr<T> extends Object
Optional, but if a value is not present, there is a List of GraphQLClientErrors instead.
There can be the paradox situation that there is a value as well as errors,
but this is what a GraphQL service could theoretically return!| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
T |
get() |
List<GraphQLClientError> |
getErrors() |
int |
hashCode() |
boolean |
isError() |
boolean |
isPresent() |
static <T> ErrorOr<T> |
of(T value) |
static <T> ErrorOr<T> |
ofErrors(List<GraphQLClientError> errors) |
String |
toString() |
public static <T> ErrorOr<T> of(T value)
public static <T> ErrorOr<T> ofErrors(List<GraphQLClientError> errors)
public boolean isPresent()
public boolean isError()
public T get()
public List<GraphQLClientError> getErrors()
Copyright © 2018–2021. All rights reserved.