Package co.featbit.commons.model
Class FBUser.Builder
java.lang.Object
co.featbit.commons.model.FBUser.Builder
- Enclosing class:
- FBUser
A builder that helps construct FBUser objects. Builder calls can be chained, supporting the following pattern:
FBUser user = new FBUser.Builder("key")
.userName("name")
.custom("property", "value")
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured FBUser object.Adds a String-valued custom attribute.Changes the user's key.set the user's userName.
-
Constructor Details
-
Builder
Creates a builder with the specified key- Parameters:
key- key
-
-
Method Details
-
key
Changes the user's key.- Parameters:
s- key- Returns:
- the builder
-
userName
set the user's userName.- Parameters:
s- username- Returns:
- the builder
-
custom
Adds a String-valued custom attribute. When set to one of the built-in user attribute keys the key/value pair will be ignored.- Parameters:
key- custom attribute namevalue- custom attribute value- Returns:
- the builder
-
build
Builds the configured FBUser object. Returns the FBUser configured by this builder
-