Class ImmutableExpressionResult
java.lang.Object
io.resys.hdes.client.api.programs.ImmutableExpressionResult
- All Implemented Interfaces:
ExpressionProgram.ExpressionResult,Program.ProgramResult,Serializable
@ParametersAreNonnullByDefault
@Generated("org.immutables.processor.ProxyProcessor")
@Immutable
@CheckReturnValue
public final class ImmutableExpressionResult
extends Object
implements ExpressionProgram.ExpressionResult
Immutable implementation of
ExpressionProgram.ExpressionResult.
Use the builder to create immutable instances:
ImmutableExpressionResult.builder().
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeImmutableExpressionResult. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forImmutableExpressionResult.static ImmutableExpressionResultcopyOf(ExpressionProgram.ExpressionResult instance) Creates an immutable copy of aExpressionProgram.ExpressionResultvalue.booleanThis instance is equal to all instances ofImmutableExpressionResultthat have equal attribute values.com.google.common.collect.ImmutableList<String>getType()getValue()inthashCode()Computes a hash code from attributes:type,constants,value.toString()Prints the immutable valueExpressionResultwith attribute values.withConstants(Iterable<String> elements) Copy the current immutable object with elements that replace the content ofconstants.withConstants(String... elements) Copy the current immutable object with elements that replace the content ofconstants.withType(TypeDef.ValueType value) Copy the current immutable object by setting a value for thetypeattribute.Copy the current immutable object by setting a value for thevalueattribute.
-
Method Details
-
getType
- Specified by:
getTypein interfaceExpressionProgram.ExpressionResult- Returns:
- The value of the
typeattribute
-
getConstants
- Specified by:
getConstantsin interfaceExpressionProgram.ExpressionResult- Returns:
- The value of the
constantsattribute
-
getValue
- Specified by:
getValuein interfaceExpressionProgram.ExpressionResult- Returns:
- The value of the
valueattribute
-
withType
Copy the current immutable object by setting a value for thetypeattribute. A value equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for type- Returns:
- A modified copy of the
thisobject
-
withConstants
Copy the current immutable object with elements that replace the content ofconstants.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withConstants
Copy the current immutable object with elements that replace the content ofconstants. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of constants elements to set- Returns:
- A modified copy of
thisobject
-
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 (can benull)- Returns:
- A modified copy of the
thisobject
-
equals
This instance is equal to all instances ofImmutableExpressionResultthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:type,constants,value. -
toString
Prints the immutable valueExpressionResultwith attribute values. -
copyOf
Creates an immutable copy of aExpressionProgram.ExpressionResultvalue. 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 ExpressionResult instance
-
builder
Creates a builder forImmutableExpressionResult.ImmutableExpressionResult.builder() .type(io.resys.hdes.client.api.ast.TypeDef.ValueType) // requiredtype.addConstants|addAllConstants(String) //constantselements .value(Object | null) // nullablevalue.build();- Returns:
- A new ImmutableExpressionResult builder
-