Package io.stargate.auth.entity
Class ImmutableActor
- java.lang.Object
-
- io.stargate.auth.entity.ImmutableActor
-
- All Implemented Interfaces:
Actor
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable public final class ImmutableActor extends Object implements Actor
Immutable implementation ofActor.Use the builder to create immutable instances:
ImmutableActor.builder(). Use the static factory method to create immutable instances:ImmutableActor.of().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableActor.BuilderBuilds instances of typeImmutableActor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableActor.Builderbuilder()Creates a builder forImmutableActor.static ImmutableActorcopyOf(Actor instance)Creates an immutable copy of aActorvalue.booleanequals(Object another)This instance is equal to all instances ofImmutableActorthat have equal attribute values.inthashCode()Computes a hash code from attributes:roleName.static ImmutableActorof(String roleName)Construct a new immutableActorinstance.StringroleName()StringtoString()Prints the immutable valueActorwith attribute values.ImmutableActorwithRoleName(String value)Copy the current immutable object by setting a value for theroleNameattribute.
-
-
-
Method Detail
-
roleName
public String roleName()
-
withRoleName
public final ImmutableActor withRoleName(String value)
Copy the current immutable object by setting a value for theroleNameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for roleName- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableActorthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:roleName.
-
toString
public String toString()
Prints the immutable valueActorwith attribute values.
-
of
public static ImmutableActor of(String roleName)
Construct a new immutableActorinstance.- Parameters:
roleName- The value for theroleNameattribute- Returns:
- An immutable Actor instance
-
copyOf
public static ImmutableActor copyOf(Actor instance)
Creates an immutable copy of aActorvalue. 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 Actor instance
-
builder
public static ImmutableActor.Builder builder()
Creates a builder forImmutableActor.ImmutableActor.builder() .roleName(String) // requiredroleName.build();- Returns:
- A new ImmutableActor builder
-
-