@ParametersAreNonnullByDefault @Generated(value={"Immutables.generator","AbstractHttpResultWrapper<T, E>"}) @Immutable public final class HttpResultWrapper<T,E> extends AbstractHttpResultWrapper<T,E>
AbstractHttpResultWrapper.
Use the builder to create immutable instances:
HttpResultWrapper.<T, E>builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
HttpResultWrapper.Builder<T,E>
Builds instances of type
HttpResultWrapper. |
| Modifier and Type | Method and Description |
|---|---|
static <T,E> HttpResultWrapper.Builder<T,E> |
builder()
Creates a builder for
HttpResultWrapper. |
static <T,E> HttpResultWrapper<T,E> |
copyOf(AbstractHttpResultWrapper<T,E> instance)
Creates an immutable copy of a
AbstractHttpResultWrapper value. |
boolean |
equals(Object another)
This instance is equal to all instances of
HttpResultWrapper that have equal attribute values. |
Optional<E> |
getErrResultMaybe() |
int |
getHttpStatusCode() |
Optional<T> |
getOkResultMaybe() |
int |
hashCode()
Computes a hash code from attributes:
okResultMaybe, errResultMaybe, httpStatusCode. |
String |
toString()
Prints the immutable value
HttpResultWrapper with attribute values. |
HttpResultWrapper<T,E> |
withErrResultMaybe(E value)
Copy the current immutable object by setting a present value for the optional
errResultMaybe attribute. |
HttpResultWrapper<T,E> |
withErrResultMaybe(Optional<E> optional)
Copy the current immutable object by setting an optional value for the
errResultMaybe attribute. |
HttpResultWrapper<T,E> |
withHttpStatusCode(int httpStatusCode)
Copy the current immutable object by setting a value for the
httpStatusCode attribute. |
HttpResultWrapper<T,E> |
withOkResultMaybe(Optional<T> optional)
Copy the current immutable object by setting an optional value for the
okResultMaybe attribute. |
HttpResultWrapper<T,E> |
withOkResultMaybe(T value)
Copy the current immutable object by setting a present value for the optional
okResultMaybe attribute. |
err, ok, unwrappublic Optional<T> getOkResultMaybe()
getOkResultMaybe in class AbstractHttpResultWrapper<T,E>okResultMaybe attributepublic Optional<E> getErrResultMaybe()
getErrResultMaybe in class AbstractHttpResultWrapper<T,E>errResultMaybe attributepublic int getHttpStatusCode()
getHttpStatusCode in class AbstractHttpResultWrapper<T,E>httpStatusCode attributepublic final HttpResultWrapper<T,E> withOkResultMaybe(@Nullable T value)
okResultMaybe attribute.value - The value for okResultMaybe, null is accepted as java.util.Optional.empty()this objectpublic final HttpResultWrapper<T,E> withOkResultMaybe(Optional<T> optional)
okResultMaybe attribute.
A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.optional - A value for okResultMaybethis objectpublic final HttpResultWrapper<T,E> withErrResultMaybe(@Nullable E value)
errResultMaybe attribute.value - The value for errResultMaybe, null is accepted as java.util.Optional.empty()this objectpublic final HttpResultWrapper<T,E> withErrResultMaybe(Optional<E> optional)
errResultMaybe attribute.
A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returning this.optional - A value for errResultMaybethis objectpublic final HttpResultWrapper<T,E> withHttpStatusCode(int httpStatusCode)
httpStatusCode attribute.
A value equality check is used to prevent copying of the same value by returning this.httpStatusCode - A new value for httpStatusCodethis objectpublic boolean equals(@Nullable Object another)
HttpResultWrapper that have equal attribute values.public int hashCode()
okResultMaybe, errResultMaybe, httpStatusCode.public String toString()
HttpResultWrapper with attribute values.public static <T,E> HttpResultWrapper<T,E> copyOf(AbstractHttpResultWrapper<T,E> instance)
AbstractHttpResultWrapper value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.T - generic parameter TE - generic parameter Einstance - The instance to copypublic static <T,E> HttpResultWrapper.Builder<T,E> builder()
HttpResultWrapper.T - generic parameter TE - generic parameter ECopyright © 2018. All rights reserved.