Package io.dialob.rule.parser.api
Class ImmutableRuleExpressionCompilerError
- java.lang.Object
-
- io.dialob.rule.parser.api.ImmutableRuleExpressionCompilerError
-
- All Implemented Interfaces:
RuleExpressionCompilerError,Serializable
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableRuleExpressionCompilerError extends Object implements RuleExpressionCompilerError
Immutable implementation ofRuleExpressionCompilerError.Use the builder to create immutable instances:
ImmutableRuleExpressionCompilerError.builder(). Use the static factory method to create immutable instances:ImmutableRuleExpressionCompilerError.of().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableRuleExpressionCompilerError.BuilderBuilds instances of typeImmutableRuleExpressionCompilerError.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableRuleExpressionCompilerError.Builderbuilder()Creates a builder forImmutableRuleExpressionCompilerError.static ImmutableRuleExpressionCompilerErrorcopyOf(RuleExpressionCompilerError instance)Creates an immutable copy of aRuleExpressionCompilerErrorvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableRuleExpressionCompilerErrorthat have equal attribute values.Optional<Object[]>getArgs()StringgetErrorCode()SpangetSpan()inthashCode()Computes a hash code from attributes:errorCode,args,span.static ImmutableRuleExpressionCompilerErrorof(String errorCode, Span span)Construct a new immutableRuleExpressionCompilerErrorinstance.StringtoString()Prints the immutable valueRuleExpressionCompilerErrorwith attribute values.ImmutableRuleExpressionCompilerErrorwithArgs(Object[] value)Copy the current immutable object by setting a present value for the optionalargsattribute.ImmutableRuleExpressionCompilerErrorwithArgs(Optional<? extends Object[]> optional)Copy the current immutable object by setting an optional value for theargsattribute.ImmutableRuleExpressionCompilerErrorwithErrorCode(String value)Copy the current immutable object by setting a value for theerrorCodeattribute.ImmutableRuleExpressionCompilerErrorwithSpan(Span value)Copy the current immutable object by setting a value for thespanattribute.
-
-
-
Method Detail
-
getErrorCode
public String getErrorCode()
- Specified by:
getErrorCodein interfaceRuleExpressionCompilerError- Returns:
- The value of the
errorCodeattribute
-
getArgs
public Optional<Object[]> getArgs()
- Specified by:
getArgsin interfaceRuleExpressionCompilerError- Returns:
- The value of the
argsattribute
-
getSpan
public Span getSpan()
- Specified by:
getSpanin interfaceRuleExpressionCompilerError- Returns:
- The value of the
spanattribute
-
withErrorCode
public final ImmutableRuleExpressionCompilerError withErrorCode(String value)
Copy the current immutable object by setting a value for theerrorCodeattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for errorCode- Returns:
- A modified copy of the
thisobject
-
withArgs
public final ImmutableRuleExpressionCompilerError withArgs(Object[] value)
Copy the current immutable object by setting a present value for the optionalargsattribute.- Parameters:
value- The value for args- Returns:
- A modified copy of
thisobject
-
withArgs
public final ImmutableRuleExpressionCompilerError withArgs(Optional<? extends Object[]> optional)
Copy the current immutable object by setting an optional value for theargsattribute. A shallow reference equality check is used on unboxed optional value to prevent copying of the same value by returningthis.- Parameters:
optional- A value for args- Returns:
- A modified copy of
thisobject
-
withSpan
public final ImmutableRuleExpressionCompilerError withSpan(Span value)
Copy the current immutable object by setting a value for thespanattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for span- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableRuleExpressionCompilerErrorthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:errorCode,args,span.
-
toString
public String toString()
Prints the immutable valueRuleExpressionCompilerErrorwith attribute values.
-
of
public static ImmutableRuleExpressionCompilerError of(String errorCode, Span span)
Construct a new immutableRuleExpressionCompilerErrorinstance.- Parameters:
errorCode- The value for theerrorCodeattributespan- The value for thespanattribute- Returns:
- An immutable RuleExpressionCompilerError instance
-
copyOf
public static ImmutableRuleExpressionCompilerError copyOf(RuleExpressionCompilerError instance)
Creates an immutable copy of aRuleExpressionCompilerErrorvalue. 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 RuleExpressionCompilerError instance
-
builder
public static ImmutableRuleExpressionCompilerError.Builder builder()
Creates a builder forImmutableRuleExpressionCompilerError.ImmutableRuleExpressionCompilerError.builder() .errorCode(String) // requirederrorCode.args(Object[]) // optionalargs.span(io.dialob.rule.parser.node.Span) // optionalspan.build();- Returns:
- A new ImmutableRuleExpressionCompilerError builder
-
-