Class ImmutableServiceResult
java.lang.Object
io.resys.hdes.client.api.programs.ImmutableServiceResult
- All Implemented Interfaces:
Program.ProgramResult,ServiceProgram.ServiceResult,Serializable
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableServiceResult
extends Object
implements ServiceProgram.ServiceResult
Immutable implementation of
ServiceProgram.ServiceResult.
Use the builder to create immutable instances:
ImmutableServiceResult.builder().
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableServiceResult. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableServiceResult.static ImmutableServiceResultcopyOf(ServiceProgram.ServiceResult instance) Creates an immutable copy of aServiceProgram.ServiceResultvalue.booleanThis instance is equal to all instances ofImmutableServiceResultthat have equal attribute values.getValue()inthashCode()Computes a hash code from attributes:value.toString()Prints the immutable valueServiceResultwith attribute values.final ImmutableServiceResultwithValue(Serializable value) Copy the current immutable object by setting a value for thevalueattribute.
-
Method Details
-
getValue
- Specified by:
getValuein interfaceServiceProgram.ServiceResult- Returns:
- The value of the
valueattribute
-
withValue
Copy the current immutable object by setting a value for thevalueattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for value- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableServiceResultthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:value. -
toString
Prints the immutable valueServiceResultwith attribute values. -
copyOf
Creates an immutable copy of aServiceProgram.ServiceResultvalue. 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 ServiceResult instance
-
builder
Creates a builder forImmutableServiceResult.ImmutableServiceResult.builder() .value(java.io.Serializable) // requiredvalue.build();- Returns:
- A new ImmutableServiceResult builder
-