Package io.dialob.security.uaa.spi.model
Class ImmutableUaaUser.Email
- java.lang.Object
-
- io.dialob.security.uaa.spi.model.ImmutableUaaUser.Email
-
- All Implemented Interfaces:
UaaUser.Email
- Enclosing class:
- ImmutableUaaUser
@Immutable public static final class ImmutableUaaUser.Email extends Object implements UaaUser.Email
Immutable implementation ofUaaUser.Email.Use the builder to create immutable instances:
ImmutableUaaUser.Email.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableUaaUser.Email.BuilderBuilds instances of typeEmail.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableUaaUser.Email.Builderbuilder()Creates a builder forEmail.static ImmutableUaaUser.EmailcopyOf(UaaUser.Email instance)Creates an immutable copy of aUaaUser.Emailvalue.booleanequals(Object another)This instance is equal to all instances ofEmailthat have equal attribute values.BooleangetPrimary()StringgetValue()inthashCode()Computes a hash code from attributes:value,primary.StringtoString()Prints the immutable valueEmailwith attribute values.ImmutableUaaUser.EmailwithPrimary(Boolean value)Copy the current immutable object by setting a value for theprimaryattribute.ImmutableUaaUser.EmailwithValue(String value)Copy the current immutable object by setting a value for thevalueattribute.
-
-
-
Method Detail
-
getValue
public String getValue()
- Specified by:
getValuein interfaceUaaUser.Email- Returns:
- The value of the
valueattribute
-
getPrimary
public Boolean getPrimary()
- Specified by:
getPrimaryin interfaceUaaUser.Email- Returns:
- The value of the
primaryattribute
-
withValue
public final ImmutableUaaUser.Email withValue(String value)
Copy the current immutable object by setting a value for thevalueattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for value (can benull)- Returns:
- A modified copy of the
thisobject
-
withPrimary
public final ImmutableUaaUser.Email withPrimary(Boolean value)
Copy the current immutable object by setting a value for theprimaryattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for primary (can benull)- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofEmailthat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:value,primary.
-
toString
public String toString()
Prints the immutable valueEmailwith attribute values.
-
copyOf
public static ImmutableUaaUser.Email copyOf(UaaUser.Email instance)
Creates an immutable copy of aUaaUser.Emailvalue. 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 Email instance
-
builder
public static ImmutableUaaUser.Email.Builder builder()
Creates a builder forEmail.ImmutableUaaUser.Email.builder() .value(String | null) // nullablevalue.primary(Boolean | null) // nullableprimary.build();- Returns:
- A new Email builder
-
-