Class ImmutableAgentId
- java.lang.Object
-
- com.chutneytesting.agent.domain.explore.ImmutableAgentId
-
- All Implemented Interfaces:
AgentId
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableAgentId extends Object implements AgentId
Immutable implementation ofAgentId.Use the builder to create immutable instances:
ImmutableAgentId.builder(). Use the static factory method to create immutable instances:ImmutableAgentId.of().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableAgentId.BuilderBuilds instances of typeImmutableAgentId.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableAgentId.Builderbuilder()Creates a builder forImmutableAgentId.static ImmutableAgentIdcopyOf(AgentId instance)Creates an immutable copy of aAgentIdvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableAgentIdthat have equal attribute values.inthashCode()Computes a hash code from attributes:name.Stringname()static ImmutableAgentIdof(String name)Construct a new immutableAgentIdinstance.StringtoString()Prints the immutable valueAgentIdwith attribute values.ImmutableAgentIdwithName(String value)Copy the current immutable object by setting a value for thenameattribute.
-
-
-
Method Detail
-
name
public String name()
-
withName
public final ImmutableAgentId withName(String value)
Copy the current immutable object by setting a value for thenameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for name- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableAgentIdthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:name.
-
toString
public String toString()
Prints the immutable valueAgentIdwith attribute values.
-
of
public static ImmutableAgentId of(String name)
Construct a new immutableAgentIdinstance.- Parameters:
name- The value for thenameattribute- Returns:
- An immutable AgentId instance
-
copyOf
public static ImmutableAgentId copyOf(AgentId instance)
Creates an immutable copy of aAgentIdvalue. 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 AgentId instance
-
builder
public static ImmutableAgentId.Builder builder()
Creates a builder forImmutableAgentId.ImmutableAgentId.builder() .name(String) // requiredname.build();- Returns:
- A new ImmutableAgentId builder
-
-