Class ImmutableStaticTrigger<T>
java.lang.Object
io.dialob.session.engine.session.command.ImmutableStaticTrigger<T>
- All Implemented Interfaces:
StaticTrigger<T>,Trigger<T>,Serializable
@Generated(from="StaticTrigger",
generator="Immutables")
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableStaticTrigger<T>
extends Object
implements StaticTrigger<T>
Immutable implementation of
StaticTrigger.
Use the builder to create immutable instances:
ImmutableStaticTrigger.builder().
Use the static factory method to create immutable instances:
ImmutableStaticTrigger.of().
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableStaticTrigger. -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> ImmutableStaticTrigger.Builder<T> builder()Creates a builder forImmutableStaticTrigger.static <T> ImmutableStaticTrigger<T> copyOf(StaticTrigger<T> instance) Creates an immutable copy of aStaticTriggervalue.booleanThis instance is equal to all instances ofImmutableStaticTriggerthat have equal attribute values.com.google.common.collect.ImmutableList<Event> getWhen()inthashCode()Computes a hash code from attributes:when,allEvents.static <T> ImmutableStaticTrigger<T> of(BiPredicate<T, T> when) Construct a new immutableStaticTriggerinstance.toString()Prints the immutable valueStaticTriggerwith attribute values.final ImmutableStaticTrigger<T> withAllEvents(Event... elements) Copy the current immutable object with elements that replace the content ofallEvents.final ImmutableStaticTrigger<T> withAllEvents(Iterable<? extends Event> elements) Copy the current immutable object with elements that replace the content ofallEvents.final ImmutableStaticTrigger<T> withWhen(BiPredicate<T, T> value) Copy the current immutable object by setting a value for thewhenattribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.dialob.session.engine.session.command.Trigger
apply, createEvent
-
Method Details
-
getWhen
-
getAllEvents
- Specified by:
getAllEventsin interfaceTrigger<T>- Returns:
- The value of the
allEventsattribute
-
withWhen
Copy the current immutable object by setting a value for thewhenattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for when- Returns:
- A modified copy or the
thisobject
-
withAllEvents
Copy the current immutable object with elements that replace the content ofallEvents.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withAllEvents
Copy the current immutable object with elements that replace the content ofallEvents. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of allEvents elements to set- Returns:
- A modified copy or
thisif not changed
-
equals
This instance is equal to all instances ofImmutableStaticTriggerthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:when,allEvents. -
toString
Prints the immutable valueStaticTriggerwith attribute values. -
of
Construct a new immutableStaticTriggerinstance.- Type Parameters:
T- generic parameter T- Parameters:
when- The value for thewhenattribute- Returns:
- An immutable StaticTrigger instance
-
copyOf
Creates an immutable copy of aStaticTriggervalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Type Parameters:
T- generic parameter T- Parameters:
instance- The instance to copy- Returns:
- A copied immutable StaticTrigger instance
-
builder
Creates a builder forImmutableStaticTrigger.ImmutableStaticTrigger.<T>builder() .when(function.BiPredicate<T, T>) // requiredwhen.addAllEvents|addAllAllEvents(io.dialob.session.engine.session.command.event.Event) //allEventselements .build();- Type Parameters:
T- generic parameter T- Returns:
- A new ImmutableStaticTrigger builder
-