public class UserProfileBuilder extends Object
UserProfile
instance returned by ApiAdapter.fetchUserProfile(Object)
Makes it easy to construct a profile instance where some of the individual fields may be null.
Also allows new profile fields to be introduced in the future without breaking compatibility with existing ApiAdapter
implementations.UserProfile
Constructor and Description |
---|
UserProfileBuilder() |
Modifier and Type | Method and Description |
---|---|
UserProfile |
build()
Builds the user profile.
|
UserProfileBuilder |
setEmail(String email)
Sets the profile email field.
|
UserProfileBuilder |
setFirstName(String firstName)
Sets the profile firstName field.
|
UserProfileBuilder |
setLastName(String lastName)
Sets the profile lastName field.
|
UserProfileBuilder |
setName(String name)
Sets the profile name field.
|
UserProfileBuilder |
setUsername(String username)
Sets the profile username field.
|
public UserProfileBuilder setName(String name)
public UserProfileBuilder setFirstName(String firstName)
public UserProfileBuilder setLastName(String lastName)
public UserProfileBuilder setEmail(String email)
public UserProfileBuilder setUsername(String username)
public UserProfile build()