Package io.dialob.program.expr.arith
Class ImmutableStringTemplateOperator
- java.lang.Object
-
- io.dialob.program.expr.arith.ImmutableStringTemplateOperator
-
- All Implemented Interfaces:
StringTemplateOperator,Expression,Serializable
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableStringTemplateOperator extends Object implements StringTemplateOperator
Immutable implementation ofStringTemplateOperator.Use the builder to create immutable instances:
ImmutableStringTemplateOperator.builder().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableStringTemplateOperator.BuilderBuilds instances of typeImmutableStringTemplateOperator.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableStringTemplateOperator.Builderbuilder()Creates a builder forImmutableStringTemplateOperator.static ImmutableStringTemplateOperatorcopyOf(StringTemplateOperator instance)Creates an immutable copy of aStringTemplateOperatorvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableStringTemplateOperatorthat have equal attribute values.com.google.common.collect.ImmutableSet<EventMatcher>getEvalRequiredConditions()StringgetTemplate()inthashCode()Computes a hash code from attributes:template,evalRequiredConditions.StringtoString()Prints the immutable valueStringTemplateOperatorwith attribute values.ImmutableStringTemplateOperatorwithEvalRequiredConditions(EventMatcher... elements)Copy the current immutable object with elements that replace the content ofevalRequiredConditions.ImmutableStringTemplateOperatorwithEvalRequiredConditions(Iterable<? extends EventMatcher> elements)Copy the current immutable object with elements that replace the content ofevalRequiredConditions.ImmutableStringTemplateOperatorwithTemplate(String value)Copy the current immutable object by setting a value for thetemplateattribute.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.dialob.program.expr.arith.StringTemplateOperator
eval, getValueType
-
-
-
-
Method Detail
-
getTemplate
public String getTemplate()
- Specified by:
getTemplatein interfaceStringTemplateOperator- Returns:
- The value of the
templateattribute
-
getEvalRequiredConditions
public com.google.common.collect.ImmutableSet<EventMatcher> getEvalRequiredConditions()
- Specified by:
getEvalRequiredConditionsin interfaceExpression- Specified by:
getEvalRequiredConditionsin interfaceStringTemplateOperator- Returns:
- The value of the
evalRequiredConditionsattribute
-
withTemplate
public final ImmutableStringTemplateOperator withTemplate(String value)
Copy the current immutable object by setting a value for thetemplateattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for template- Returns:
- A modified copy of the
thisobject
-
withEvalRequiredConditions
public final ImmutableStringTemplateOperator withEvalRequiredConditions(EventMatcher... elements)
Copy the current immutable object with elements that replace the content ofevalRequiredConditions.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withEvalRequiredConditions
public final ImmutableStringTemplateOperator withEvalRequiredConditions(Iterable<? extends EventMatcher> elements)
Copy the current immutable object with elements that replace the content ofevalRequiredConditions. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of evalRequiredConditions elements to set- Returns:
- A modified copy of
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableStringTemplateOperatorthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:template,evalRequiredConditions.
-
toString
public String toString()
Prints the immutable valueStringTemplateOperatorwith attribute values.
-
copyOf
public static ImmutableStringTemplateOperator copyOf(StringTemplateOperator instance)
Creates an immutable copy of aStringTemplateOperatorvalue. 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 StringTemplateOperator instance
-
builder
public static ImmutableStringTemplateOperator.Builder builder()
Creates a builder forImmutableStringTemplateOperator.ImmutableStringTemplateOperator.builder() .template(String) // requiredtemplate.addEvalRequiredConditions|addAllEvalRequiredConditions(io.dialob.executor.command.EventMatcher) //evalRequiredConditionselements .build();- Returns:
- A new ImmutableStringTemplateOperator builder
-
-