@ParametersAreNonnullByDefault @Generated(value={"Immutables.generator","EventResponse"}) @Immutable public final class ImmutableEventResponse extends EventResponse
EventResponse.
Use the builder to create immutable instances:
ImmutableEventResponse.builder().
Use the static factory method to create immutable instances:
ImmutableEventResponse.of().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableEventResponse.Builder
Builds instances of type
ImmutableEventResponse. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableEventResponse.Builder |
builder()
Creates a builder for
ImmutableEventResponse. |
static ImmutableEventResponse |
copyOf(EventResponse instance)
Creates an immutable copy of a
EventResponse value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableEventResponse that have equal attribute values. |
com.google.common.collect.ImmutableList<Event> |
getEvents() |
BigInteger |
getIndex() |
int |
hashCode()
Computes a hash code from attributes:
events, index. |
static ImmutableEventResponse |
of(Iterable<? extends Event> events,
BigInteger index)
Construct a new immutable
EventResponse instance. |
static ImmutableEventResponse |
of(List<Event> events,
BigInteger index)
Construct a new immutable
EventResponse instance. |
String |
toString()
Prints the immutable value
EventResponse with attribute values. |
ImmutableEventResponse |
withEvents(Event... elements)
Copy the current immutable object with elements that replace the content of
events. |
ImmutableEventResponse |
withEvents(Iterable<? extends Event> elements)
Copy the current immutable object with elements that replace the content of
events. |
ImmutableEventResponse |
withIndex(BigInteger value)
Copy the current immutable object by setting a value for the
index attribute. |
public com.google.common.collect.ImmutableList<Event> getEvents()
getEvents in class EventResponseevents attributepublic BigInteger getIndex()
getIndex in class EventResponseindex attributepublic final ImmutableEventResponse withEvents(Event... elements)
events.elements - The elements to setthis objectpublic final ImmutableEventResponse withEvents(Iterable<? extends Event> elements)
events.
A shallow reference equality check is used to prevent copying of the same value by returning this.elements - An iterable of events elements to setthis objectpublic final ImmutableEventResponse withIndex(BigInteger value)
index attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for indexthis objectpublic boolean equals(@Nullable Object another)
ImmutableEventResponse that have equal attribute values.public int hashCode()
events, index.public String toString()
EventResponse with attribute values.public static ImmutableEventResponse of(List<Event> events, BigInteger index)
EventResponse instance.events - The value for the events attributeindex - The value for the index attributepublic static ImmutableEventResponse of(Iterable<? extends Event> events, BigInteger index)
EventResponse instance.events - The value for the events attributeindex - The value for the index attributepublic static ImmutableEventResponse copyOf(EventResponse instance)
EventResponse value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.instance - The instance to copypublic static ImmutableEventResponse.Builder builder()
ImmutableEventResponse.Copyright © 2018. All rights reserved.