Package io.dialob.client.api
Class ImmutableCurrentUser
- java.lang.Object
-
- io.dialob.client.api.ImmutableCurrentUser
-
- All Implemented Interfaces:
CurrentUserSupplier.CurrentUser
@ParametersAreNonnullByDefault @Generated("org.immutables.processor.ProxyProcessor") @Immutable @CheckReturnValue public final class ImmutableCurrentUser extends Object implements CurrentUserSupplier.CurrentUser
Immutable implementation ofCurrentUserSupplier.CurrentUser.Use the builder to create immutable instances:
ImmutableCurrentUser.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableCurrentUser.BuilderBuilds instances of typeImmutableCurrentUser.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableCurrentUser.Builderbuilder()Creates a builder forImmutableCurrentUser.static ImmutableCurrentUsercopyOf(CurrentUserSupplier.CurrentUser instance)Creates an immutable copy of aCurrentUserSupplier.CurrentUservalue.booleanequals(Object another)This instance is equal to all instances ofImmutableCurrentUserthat have equal attribute values.StringgetEmail()StringgetUser()inthashCode()Computes a hash code from attributes:user,email.StringtoString()Prints the immutable valueCurrentUserwith attribute values.ImmutableCurrentUserwithEmail(String value)Copy the current immutable object by setting a value for theemailattribute.ImmutableCurrentUserwithUser(String value)Copy the current immutable object by setting a value for theuserattribute.
-
-
-
Method Detail
-
getUser
public String getUser()
- Specified by:
getUserin interfaceCurrentUserSupplier.CurrentUser- Returns:
- The value of the
userattribute
-
getEmail
public String getEmail()
- Specified by:
getEmailin interfaceCurrentUserSupplier.CurrentUser- Returns:
- The value of the
emailattribute
-
withUser
public final ImmutableCurrentUser withUser(String value)
Copy the current immutable object by setting a value for theuserattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for user- Returns:
- A modified copy of the
thisobject
-
withEmail
public final ImmutableCurrentUser withEmail(String value)
Copy the current immutable object by setting a value for theemailattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for email- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofImmutableCurrentUserthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:user,email.
-
toString
public String toString()
Prints the immutable valueCurrentUserwith attribute values.
-
copyOf
public static ImmutableCurrentUser copyOf(CurrentUserSupplier.CurrentUser instance)
Creates an immutable copy of aCurrentUserSupplier.CurrentUservalue. 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 CurrentUser instance
-
builder
public static ImmutableCurrentUser.Builder builder()
Creates a builder forImmutableCurrentUser.ImmutableCurrentUser.builder() .user(String) // requireduser.email(String) // requiredemail.build();- Returns:
- A new ImmutableCurrentUser builder
-
-