Class ImmutableDecisionResult
java.lang.Object
io.resys.hdes.client.api.programs.ImmutableDecisionResult
- All Implemented Interfaces:
DecisionProgram.DecisionResult,Program.ProgramResult,Serializable
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableDecisionResult
extends Object
implements DecisionProgram.DecisionResult
Immutable implementation of
DecisionProgram.DecisionResult.
Use the builder to create immutable instances:
ImmutableDecisionResult.builder().
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableDecisionResult. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableDecisionResult.static ImmutableDecisionResultcopyOf(DecisionProgram.DecisionResult instance) Creates an immutable copy of aDecisionProgram.DecisionResultvalue.booleanThis instance is equal to all instances ofImmutableDecisionResultthat have equal attribute values.com.google.common.collect.ImmutableList<DecisionProgram.DecisionLog>com.google.common.collect.ImmutableList<DecisionProgram.DecisionLog>inthashCode()Computes a hash code from attributes:rejections,matches.toString()Prints the immutable valueDecisionResultwith attribute values.final ImmutableDecisionResultwithMatches(DecisionProgram.DecisionLog... elements) Copy the current immutable object with elements that replace the content ofmatches.final ImmutableDecisionResultwithMatches(Iterable<? extends DecisionProgram.DecisionLog> elements) Copy the current immutable object with elements that replace the content ofmatches.final ImmutableDecisionResultwithRejections(DecisionProgram.DecisionLog... elements) Copy the current immutable object with elements that replace the content ofrejections.final ImmutableDecisionResultwithRejections(Iterable<? extends DecisionProgram.DecisionLog> elements) Copy the current immutable object with elements that replace the content ofrejections.
-
Method Details
-
getRejections
- Specified by:
getRejectionsin interfaceDecisionProgram.DecisionResult- Returns:
- The value of the
rejectionsattribute
-
getMatches
- Specified by:
getMatchesin interfaceDecisionProgram.DecisionResult- Returns:
- The value of the
matchesattribute
-
withRejections
Copy the current immutable object with elements that replace the content ofrejections.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withRejections
public final ImmutableDecisionResult withRejections(Iterable<? extends DecisionProgram.DecisionLog> elements) Copy the current immutable object with elements that replace the content ofrejections. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of rejections elements to set- Returns:
- A modified copy of
thisobject
-
withMatches
Copy the current immutable object with elements that replace the content ofmatches.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withMatches
public final ImmutableDecisionResult withMatches(Iterable<? extends DecisionProgram.DecisionLog> elements) Copy the current immutable object with elements that replace the content ofmatches. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of matches elements to set- Returns:
- A modified copy of
thisobject
-
equals
This instance is equal to all instances ofImmutableDecisionResultthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:rejections,matches. -
toString
Prints the immutable valueDecisionResultwith attribute values. -
copyOf
Creates an immutable copy of aDecisionProgram.DecisionResultvalue. 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 DecisionResult instance
-
builder
Creates a builder forImmutableDecisionResult.ImmutableDecisionResult.builder() .addRejections|addAllRejections(io.resys.hdes.client.api.programs.DecisionProgram.DecisionLog) //rejectionselements .addMatches|addAllMatches(io.resys.hdes.client.api.programs.DecisionProgram.DecisionLog) //matcheselements .build();- Returns:
- A new ImmutableDecisionResult builder
-