Package io.dialob.security.uaa.spi.model
Class ImmutableUaaUser.Name
- java.lang.Object
-
- io.dialob.security.uaa.spi.model.ImmutableUaaUser.Name
-
- All Implemented Interfaces:
UaaUser.Name
- Enclosing class:
- ImmutableUaaUser
@Immutable public static final class ImmutableUaaUser.Name extends Object implements UaaUser.Name
Immutable implementation ofUaaUser.Name.Use the builder to create immutable instances:
ImmutableUaaUser.Name.builder().
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classImmutableUaaUser.Name.BuilderBuilds instances of typeName.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ImmutableUaaUser.Name.Builderbuilder()Creates a builder forName.static ImmutableUaaUser.NamecopyOf(UaaUser.Name instance)Creates an immutable copy of aUaaUser.Namevalue.booleanequals(Object another)This instance is equal to all instances ofNamethat have equal attribute values.StringgetFamilyName()StringgetGivenName()inthashCode()Computes a hash code from attributes:familyName,givenName.StringtoString()Prints the immutable valueNamewith attribute values.ImmutableUaaUser.NamewithFamilyName(String value)Copy the current immutable object by setting a value for thefamilyNameattribute.ImmutableUaaUser.NamewithGivenName(String value)Copy the current immutable object by setting a value for thegivenNameattribute.
-
-
-
Method Detail
-
getFamilyName
public String getFamilyName()
- Specified by:
getFamilyNamein interfaceUaaUser.Name- Returns:
- The value of the
familyNameattribute
-
getGivenName
public String getGivenName()
- Specified by:
getGivenNamein interfaceUaaUser.Name- Returns:
- The value of the
givenNameattribute
-
withFamilyName
public final ImmutableUaaUser.Name withFamilyName(String value)
Copy the current immutable object by setting a value for thefamilyNameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for familyName (can benull)- Returns:
- A modified copy of the
thisobject
-
withGivenName
public final ImmutableUaaUser.Name withGivenName(String value)
Copy the current immutable object by setting a value for thegivenNameattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for givenName (can benull)- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(@Nullable Object another)This instance is equal to all instances ofNamethat have equal attribute values.
-
hashCode
public int hashCode()
Computes a hash code from attributes:familyName,givenName.
-
toString
public String toString()
Prints the immutable valueNamewith attribute values.
-
copyOf
public static ImmutableUaaUser.Name copyOf(UaaUser.Name instance)
Creates an immutable copy of aUaaUser.Namevalue. 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 Name instance
-
builder
public static ImmutableUaaUser.Name.Builder builder()
Creates a builder forName.ImmutableUaaUser.Name.builder() .familyName(String | null) // nullablefamilyName.givenName(String | null) // nullablegivenName.build();- Returns:
- A new Name builder
-
-