@ParametersAreNonnullByDefault @Generated(value="org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableEvent extends Event
Event.
Use the builder to create immutable instances:
ImmutableEvent.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableEvent.Builder
Builds instances of type
ImmutableEvent. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableEvent.Builder |
builder()
Creates a builder for
ImmutableEvent. |
static ImmutableEvent |
copyOf(Event instance)
Creates an immutable copy of a
Event value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableEvent that have equal attribute values. |
String |
getId() |
Long |
getLTime() |
String |
getName() |
Optional<String> |
getNodeFilter() |
Optional<String> |
getPayload() |
Optional<String> |
getServiceFilter() |
Optional<String> |
getTagFilter() |
int |
getVersion() |
int |
hashCode()
Computes a hash code from attributes:
id, name, payload, nodeFilter, serviceFilter, tagFilter, version, lTime. |
String |
toString()
Prints the immutable value
Event with attribute values. |
ImmutableEvent |
withId(String value)
Copy the current immutable object by setting a value for the
id attribute. |
ImmutableEvent |
withLTime(Long value)
Copy the current immutable object by setting a value for the
lTime attribute. |
ImmutableEvent |
withName(String value)
Copy the current immutable object by setting a value for the
name attribute. |
ImmutableEvent |
withNodeFilter(Optional<String> optional)
Copy the current immutable object by setting an optional value for the
nodeFilter attribute. |
ImmutableEvent |
withNodeFilter(String value)
Copy the current immutable object by setting a present value for the optional
nodeFilter attribute. |
ImmutableEvent |
withPayload(Optional<String> optional)
Copy the current immutable object by setting an optional value for the
payload attribute. |
ImmutableEvent |
withPayload(String value)
Copy the current immutable object by setting a present value for the optional
payload attribute. |
ImmutableEvent |
withServiceFilter(Optional<String> optional)
Copy the current immutable object by setting an optional value for the
serviceFilter attribute. |
ImmutableEvent |
withServiceFilter(String value)
Copy the current immutable object by setting a present value for the optional
serviceFilter attribute. |
ImmutableEvent |
withTagFilter(Optional<String> optional)
Copy the current immutable object by setting an optional value for the
tagFilter attribute. |
ImmutableEvent |
withTagFilter(String value)
Copy the current immutable object by setting a present value for the optional
tagFilter attribute. |
ImmutableEvent |
withVersion(int value)
Copy the current immutable object by setting a value for the
version attribute. |
public String getId()
public String getName()
public Optional<String> getPayload()
getPayload in class Eventpayload attributepublic Optional<String> getNodeFilter()
getNodeFilter in class EventnodeFilter attributepublic Optional<String> getServiceFilter()
getServiceFilter in class EventserviceFilter attributepublic Optional<String> getTagFilter()
getTagFilter in class EventtagFilter attributepublic int getVersion()
getVersion in class Eventversion attributepublic Long getLTime()
public final ImmutableEvent withId(String value)
id attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for idthis objectpublic final ImmutableEvent withName(String value)
name attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for namethis objectpublic final ImmutableEvent withPayload(String value)
payload attribute.value - The value for payloadthis objectpublic final ImmutableEvent withPayload(Optional<String> optional)
payload attribute.
An equality check is used on inner nullable value to prevent copying of the same value by returning this.optional - A value for payloadthis objectpublic final ImmutableEvent withNodeFilter(String value)
nodeFilter attribute.value - The value for nodeFilterthis objectpublic final ImmutableEvent withNodeFilter(Optional<String> optional)
nodeFilter attribute.
An equality check is used on inner nullable value to prevent copying of the same value by returning this.optional - A value for nodeFilterthis objectpublic final ImmutableEvent withServiceFilter(String value)
serviceFilter attribute.value - The value for serviceFilterthis objectpublic final ImmutableEvent withServiceFilter(Optional<String> optional)
serviceFilter attribute.
An equality check is used on inner nullable value to prevent copying of the same value by returning this.optional - A value for serviceFilterthis objectpublic final ImmutableEvent withTagFilter(String value)
tagFilter attribute.value - The value for tagFilterthis objectpublic final ImmutableEvent withTagFilter(Optional<String> optional)
tagFilter attribute.
An equality check is used on inner nullable value to prevent copying of the same value by returning this.optional - A value for tagFilterthis objectpublic final ImmutableEvent withVersion(int value)
version attribute.
A value equality check is used to prevent copying of the same value by returning this.value - A new value for versionthis objectpublic final ImmutableEvent withLTime(Long value)
lTime attribute.
An equals check used to prevent copying of the same value by returning this.value - A new value for lTimethis objectpublic boolean equals(@Nullable Object another)
ImmutableEvent that have equal attribute values.public int hashCode()
id, name, payload, nodeFilter, serviceFilter, tagFilter, version, lTime.public String toString()
Event with attribute values.public static ImmutableEvent copyOf(Event instance)
Event 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 ImmutableEvent.Builder builder()
ImmutableEvent.
ImmutableEvent.builder()
.id(String) // required id
.name(String) // required name
.payload(String) // optional payload
.nodeFilter(String) // optional nodeFilter
.serviceFilter(String) // optional serviceFilter
.tagFilter(String) // optional tagFilter
.version(int) // required version
.lTime(Long) // required lTime
.build();
Copyright © 2019. All rights reserved.