Package io.dialob.executor.model
Class ImmutableErrorId
- java.lang.Object
-
- io.dialob.executor.model.ImmutableErrorId
-
- All Implemented Interfaces:
ErrorId,ItemId,Serializable
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableErrorId extends Object implements ErrorId
Immutable implementation ofErrorId.Use the builder to create immutable instances:
ImmutableErrorId.builder(). Use the static factory method to create immutable instances:ImmutableErrorId.of().- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableErrorId.BuilderBuilds instances of typeImmutableErrorId.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableErrorId.Builderbuilder()Creates a builder forImmutableErrorId.static ImmutableErrorIdcopyOf(ErrorId instance)Creates an immutable copy of aErrorIdvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableErrorIdthat have equal attribute values.StringgetCode()ItemIdgetItemId()inthashCode()Computes a hash code from attributes:itemId,code.static ImmutableErrorIdof(ItemId itemId, String code)Construct a new immutableErrorIdinstance.StringtoString()Prints the immutable valueErrorIdwith attribute values.ImmutableErrorIdwithCode(String value)Copy the current immutable object by setting a value for thecodeattribute.ImmutableErrorIdwithItemId(ItemId value)Copy the current immutable object by setting a value for theitemIdattribute.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.dialob.executor.model.ItemId
withParent, withParent
-
-
-
-
Method Detail
-
getItemId
public ItemId getItemId()
-
getCode
@Nullable public String getCode()
-
withItemId
public final ImmutableErrorId withItemId(ItemId value)
Copy the current immutable object by setting a value for theitemIdattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Specified by:
withItemIdin interfaceErrorId- Parameters:
value- A new value for itemId- Returns:
- A modified copy of the
thisobject
-
withCode
public final ImmutableErrorId withCode(@Nullable String value)
Copy the current immutable object by setting a value for thecodeattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for code (can benull)- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableErrorIdthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:itemId,code.
-
toString
public String toString()
Prints the immutable valueErrorIdwith attribute values.
-
of
public static ImmutableErrorId of(ItemId itemId, @Nullable String code)
Construct a new immutableErrorIdinstance.- Parameters:
itemId- The value for theitemIdattributecode- The value for thecodeattribute- Returns:
- An immutable ErrorId instance
-
copyOf
public static ImmutableErrorId copyOf(ErrorId instance)
Creates an immutable copy of aErrorIdvalue. 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 ErrorId instance
-
builder
public static ImmutableErrorId.Builder builder()
Creates a builder forImmutableErrorId.ImmutableErrorId.builder() .itemId(io.dialob.executor.model.ItemId) // requireditemId.code(String | null) // nullablecode.build();- Returns:
- A new ImmutableErrorId builder
-
-