Class ImmutableDecisionRow
java.lang.Object
io.resys.hdes.client.api.programs.ImmutableDecisionRow
- All Implemented Interfaces:
DecisionProgram.DecisionRow,Serializable
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableDecisionRow
extends Object
implements DecisionProgram.DecisionRow
Immutable implementation of
DecisionProgram.DecisionRow.
Use the builder to create immutable instances:
ImmutableDecisionRow.builder().
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableDecisionRow. -
Method Summary
Modifier and TypeMethodDescriptionstatic ImmutableDecisionRow.Builderbuilder()Creates a builder forImmutableDecisionRow.static ImmutableDecisionRowcopyOf(DecisionProgram.DecisionRow instance) Creates an immutable copy of aDecisionProgram.DecisionRowvalue.booleanThis instance is equal to all instances ofImmutableDecisionRowthat have equal attribute values.com.google.common.collect.ImmutableList<DecisionProgram.DecisionRowAccepts>intgetOrder()com.google.common.collect.ImmutableList<DecisionProgram.DecisionRowReturns>inthashCode()Computes a hash code from attributes:order,accepts,returns.toString()Prints the immutable valueDecisionRowwith attribute values.final ImmutableDecisionRowwithAccepts(DecisionProgram.DecisionRowAccepts... elements) Copy the current immutable object with elements that replace the content ofaccepts.final ImmutableDecisionRowwithAccepts(Iterable<? extends DecisionProgram.DecisionRowAccepts> elements) Copy the current immutable object with elements that replace the content ofaccepts.final ImmutableDecisionRowwithOrder(int value) Copy the current immutable object by setting a value for theorderattribute.final ImmutableDecisionRowwithReturns(DecisionProgram.DecisionRowReturns... elements) Copy the current immutable object with elements that replace the content ofreturns.final ImmutableDecisionRowwithReturns(Iterable<? extends DecisionProgram.DecisionRowReturns> elements) Copy the current immutable object with elements that replace the content ofreturns.
-
Method Details
-
getOrder
public int getOrder()- Specified by:
getOrderin interfaceDecisionProgram.DecisionRow- Returns:
- The value of the
orderattribute
-
getAccepts
- Specified by:
getAcceptsin interfaceDecisionProgram.DecisionRow- Returns:
- The value of the
acceptsattribute
-
getReturns
- Specified by:
getReturnsin interfaceDecisionProgram.DecisionRow- Returns:
- The value of the
returnsattribute
-
withOrder
Copy the current immutable object by setting a value for theorderattribute. A value equality check is 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 ImmutableDecisionRow withAccepts(Iterable<? extends DecisionProgram.DecisionRowAccepts> 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 ImmutableDecisionRow withReturns(Iterable<? extends DecisionProgram.DecisionRowReturns> 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 ofImmutableDecisionRowthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:order,accepts,returns. -
toString
Prints the immutable valueDecisionRowwith attribute values. -
copyOf
Creates an immutable copy of aDecisionProgram.DecisionRowvalue. 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 DecisionRow instance
-
builder
Creates a builder forImmutableDecisionRow.ImmutableDecisionRow.builder() .order(int) // requiredorder.addAccepts|addAllAccepts(io.resys.hdes.client.api.programs.DecisionProgram.DecisionRowAccepts) //acceptselements .addReturns|addAllReturns(io.resys.hdes.client.api.programs.DecisionProgram.DecisionRowReturns) //returnselements .build();- Returns:
- A new ImmutableDecisionRow builder
-