Package com.orbitz.consul.model
Class ImmutableEventResponse
- java.lang.Object
-
- com.orbitz.consul.model.EventResponse
-
- com.orbitz.consul.model.ImmutableEventResponse
-
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableEventResponse extends EventResponseImmutable implementation ofEventResponse.Use the builder to create immutable instances:
ImmutableEventResponse.builder(). Use the static factory method to create immutable instances:ImmutableEventResponse.of().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableEventResponse.BuilderBuilds instances of typeImmutableEventResponse.
-
Method Summary
Modifier and Type Method Description static ImmutableEventResponse.Builderbuilder()Creates a builder forImmutableEventResponse.static ImmutableEventResponsecopyOf(EventResponse instance)Creates an immutable copy of aEventResponsevalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofImmutableEventResponsethat have equal attribute values.com.google.common.collect.ImmutableList<Event>getEvents()java.math.BigIntegergetIndex()inthashCode()Computes a hash code from attributes:events,index.static ImmutableEventResponseof(java.lang.Iterable<? extends Event> events, java.math.BigInteger index)Construct a new immutableEventResponseinstance.static ImmutableEventResponseof(java.util.List<Event> events, java.math.BigInteger index)Construct a new immutableEventResponseinstance.java.lang.StringtoString()Prints the immutable valueEventResponsewith attribute values.ImmutableEventResponsewithEvents(Event... elements)Copy the current immutable object with elements that replace the content ofevents.ImmutableEventResponsewithEvents(java.lang.Iterable<? extends Event> elements)Copy the current immutable object with elements that replace the content ofevents.ImmutableEventResponsewithIndex(java.math.BigInteger value)Copy the current immutable object by setting a value for theindexattribute.
-
-
-
Method Detail
-
getEvents
public com.google.common.collect.ImmutableList<Event> getEvents()
- Specified by:
getEventsin classEventResponse- Returns:
- The value of the
eventsattribute
-
getIndex
public java.math.BigInteger getIndex()
- Specified by:
getIndexin classEventResponse- Returns:
- The value of the
indexattribute
-
withEvents
public final ImmutableEventResponse withEvents(Event... elements)
Copy the current immutable object with elements that replace the content ofevents.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withEvents
public final ImmutableEventResponse withEvents(java.lang.Iterable<? extends Event> elements)
Copy the current immutable object with elements that replace the content ofevents. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of events elements to set- Returns:
- A modified copy of
thisobject
-
withIndex
public final ImmutableEventResponse withIndex(java.math.BigInteger value)
Copy the current immutable object by setting a value for theindexattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for index- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable java.lang.Object another)This instance is equal to all instances ofImmutableEventResponsethat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()
Computes a hash code from attributes:events,index.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()
Prints the immutable valueEventResponsewith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
of
public static ImmutableEventResponse of(java.util.List<Event> events, java.math.BigInteger index)
Construct a new immutableEventResponseinstance.- Parameters:
events- The value for theeventsattributeindex- The value for theindexattribute- Returns:
- An immutable EventResponse instance
-
of
public static ImmutableEventResponse of(java.lang.Iterable<? extends Event> events, java.math.BigInteger index)
Construct a new immutableEventResponseinstance.- Parameters:
events- The value for theeventsattributeindex- The value for theindexattribute- Returns:
- An immutable EventResponse instance
-
copyOf
public static ImmutableEventResponse copyOf(EventResponse instance)
Creates an immutable copy of aEventResponsevalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable EventResponse instance
-
builder
public static ImmutableEventResponse.Builder builder()
Creates a builder forImmutableEventResponse.ImmutableEventResponse.builder() .addEvents|addAllEvents(com.orbitz.consul.model.event.Event) //eventselements .index(java.math.BigInteger) // requiredindex.build();- Returns:
- A new ImmutableEventResponse builder
-
-