Package io.dialob.program.expr
Class ImmutableExpressionList
- java.lang.Object
-
- io.dialob.program.expr.ImmutableExpressionList
-
- All Implemented Interfaces:
ExpressionList,Expression,Serializable
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableExpressionList extends Object implements ExpressionList
Immutable implementation ofExpressionList.Use the builder to create immutable instances:
ImmutableExpressionList.builder().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableExpressionList.BuilderBuilds instances of typeImmutableExpressionList.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableExpressionList.Builderbuilder()Creates a builder forImmutableExpressionList.static ImmutableExpressionListcopyOf(ExpressionList instance)Creates an immutable copy of aExpressionListvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableExpressionListthat have equal attribute values.com.google.common.collect.ImmutableList<Expression>getExpressions()inthashCode()Computes a hash code from attributes:expressions.StringtoString()Prints the immutable valueExpressionListwith attribute values.ImmutableExpressionListwithExpressions(Expression... elements)Copy the current immutable object with elements that replace the content ofexpressions.ImmutableExpressionListwithExpressions(Iterable<? extends Expression> elements)Copy the current immutable object with elements that replace the content ofexpressions.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.dialob.program.expr.ExpressionList
eval, getEvalRequiredConditions, getValueType
-
-
-
-
Method Detail
-
getExpressions
public com.google.common.collect.ImmutableList<Expression> getExpressions()
- Specified by:
getExpressionsin interfaceExpressionList- Returns:
- The value of the
expressionsattribute
-
withExpressions
public final ImmutableExpressionList withExpressions(Expression... elements)
Copy the current immutable object with elements that replace the content ofexpressions.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withExpressions
public final ImmutableExpressionList withExpressions(Iterable<? extends Expression> elements)
Copy the current immutable object with elements that replace the content ofexpressions. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of expressions elements to set- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableExpressionListthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:expressions.
-
toString
public String toString()
Prints the immutable valueExpressionListwith attribute values.
-
copyOf
public static ImmutableExpressionList copyOf(ExpressionList instance)
Creates an immutable copy of aExpressionListvalue. 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 ExpressionList instance
-
builder
public static ImmutableExpressionList.Builder builder()
Creates a builder forImmutableExpressionList.ImmutableExpressionList.builder() .addExpressions|addAllExpressions(io.dialob.program.model.Expression) //expressionselements .build();- Returns:
- A new ImmutableExpressionList builder
-
-