Class ImmutableDecisionLog
java.lang.Object
io.resys.hdes.client.api.programs.ImmutableDecisionLog
- All Implemented Interfaces:
DecisionProgram.DecisionLog,Serializable
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableDecisionLog
extends Object
implements DecisionProgram.DecisionLog
Immutable implementation of
DecisionProgram.DecisionLog.
Use the builder to create immutable instances:
ImmutableDecisionLog.builder().
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableDecisionLog. -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableDecisionLog.Builderbuilder()Creates a builder forImmutableDecisionLog.static ImmutableDecisionLogcopyOf(DecisionProgram.DecisionLog instance) Creates an immutable copy of aDecisionProgram.DecisionLogvalue.booleanThis instance is equal to all instances ofImmutableDecisionLogthat have equal attribute values.com.google.common.collect.ImmutableList<DecisionProgram.DecisionLogEntry>getMatch()getOrder()com.google.common.collect.ImmutableList<DecisionProgram.DecisionLogEntry>inthashCode()Computes a hash code from attributes:match,order,accepts,returns.toString()Prints the immutable valueDecisionLogwith attribute values.final ImmutableDecisionLogwithAccepts(DecisionProgram.DecisionLogEntry... elements) Copy the current immutable object with elements that replace the content ofaccepts.final ImmutableDecisionLogwithAccepts(Iterable<? extends DecisionProgram.DecisionLogEntry> elements) Copy the current immutable object with elements that replace the content ofaccepts.final ImmutableDecisionLogCopy the current immutable object by setting a value for thematchattribute.final ImmutableDecisionLogCopy the current immutable object by setting a value for theorderattribute.final ImmutableDecisionLogwithReturns(DecisionProgram.DecisionLogEntry... elements) Copy the current immutable object with elements that replace the content ofreturns.final ImmutableDecisionLogwithReturns(Iterable<? extends DecisionProgram.DecisionLogEntry> elements) Copy the current immutable object with elements that replace the content ofreturns.
-
Method Details
-
getMatch
- Specified by:
getMatchin interfaceDecisionProgram.DecisionLog- Returns:
- The value of the
matchattribute
-
getOrder
- Specified by:
getOrderin interfaceDecisionProgram.DecisionLog- Returns:
- The value of the
orderattribute
-
getAccepts
- Specified by:
getAcceptsin interfaceDecisionProgram.DecisionLog- Returns:
- The value of the
acceptsattribute
-
getReturns
- Specified by:
getReturnsin interfaceDecisionProgram.DecisionLog- Returns:
- The value of the
returnsattribute
-
withMatch
Copy the current immutable object by setting a value for thematchattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for match- Returns:
- A modified copy of the
thisobject
-
withOrder
Copy the current immutable object by setting a value for theorderattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for order- Returns:
- A modified copy of the
thisobject
-
withAccepts
Copy the current immutable object with elements that replace the content ofaccepts.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withAccepts
public final ImmutableDecisionLog withAccepts(Iterable<? extends DecisionProgram.DecisionLogEntry> elements) Copy the current immutable object with elements that replace the content ofaccepts. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of accepts elements to set- Returns:
- A modified copy of
thisobject
-
withReturns
Copy the current immutable object with elements that replace the content ofreturns.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withReturns
public final ImmutableDecisionLog withReturns(Iterable<? extends DecisionProgram.DecisionLogEntry> elements) Copy the current immutable object with elements that replace the content ofreturns. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of returns elements to set- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableDecisionLogthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:match,order,accepts,returns. -
toString
Prints the immutable valueDecisionLogwith attribute values. -
copyOf
Creates an immutable copy of aDecisionProgram.DecisionLogvalue. 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 DecisionLog instance
-
builder
Creates a builder forImmutableDecisionLog.ImmutableDecisionLog.builder() .match(Boolean) // requiredmatch.order(Integer) // requiredorder.addAccepts|addAllAccepts(io.resys.hdes.client.api.programs.DecisionProgram.DecisionLogEntry) //acceptselements .addReturns|addAllReturns(io.resys.hdes.client.api.programs.DecisionProgram.DecisionLogEntry) //returnselements .build();- Returns:
- A new ImmutableDecisionLog builder
-