public static class LDUser.Builder
extends java.lang.Object
Constructor and Description |
---|
Builder(LDUser user) |
Builder(java.lang.String key)
Create a builder with the specified key
|
Modifier and Type | Method and Description |
---|---|
LDUser.Builder |
anonymous(boolean anonymous)
Sets whether this user is anonymous
|
LDUser.Builder |
avatar(java.lang.String avatar)
Sets the user's avatar
|
LDUser |
build()
Build the configured
LDUser object |
LDUser.Builder |
country(LDCountryCode country)
Deprecated.
As of version 2.10.0, in 3.0.0 the SDK will no longer include the
LDCountryCode class. Applications should use
country(String) instead. |
LDUser.Builder |
country(java.lang.String s)
Set the country for a user.
|
LDUser.Builder |
custom(java.lang.String k,
java.lang.Boolean b)
Add a
Boolean -valued custom attribute. |
LDUser.Builder |
custom(java.lang.String k,
java.util.List<java.lang.String> vs)
Deprecated.
As of version 0.16.0, renamed to
customString |
LDUser.Builder |
custom(java.lang.String k,
java.lang.Number n)
Add a
Number -valued custom attribute. |
LDUser.Builder |
custom(java.lang.String k,
java.lang.String v)
Add a
String -valued custom attribute. |
LDUser.Builder |
customNumber(java.lang.String k,
java.util.List<java.lang.Number> vs)
Add a list of
Integer -valued custom attributes. |
LDUser.Builder |
customString(java.lang.String k,
java.util.List<java.lang.String> vs)
Add a list of
String -valued custom attributes. |
LDUser.Builder |
email(java.lang.String email)
Sets the user's e-mail address
|
LDUser.Builder |
firstName(java.lang.String firstName)
Sets the user's first name
|
LDUser.Builder |
ip(java.lang.String s)
Set the IP for a user
|
LDUser.Builder |
lastName(java.lang.String lastName)
Sets the user's last name
|
LDUser.Builder |
name(java.lang.String name)
Sets the user's full name
|
LDUser.Builder |
privateAvatar(java.lang.String avatar)
Sets the user's avatar.
|
LDUser.Builder |
privateCountry(LDCountryCode country)
Deprecated.
As of version 2.10.0, in 3.0.0 the SDK will no longer include the
LDCountryCode class. Applications should use
privateCountry(String) instead. |
LDUser.Builder |
privateCountry(java.lang.String s)
Set the country for a user.
|
LDUser.Builder |
privateCustom(java.lang.String k,
java.lang.Boolean b)
Add a
Boolean -valued custom attribute. |
LDUser.Builder |
privateCustom(java.lang.String k,
java.lang.Number n)
Add a
Number -valued custom attribute. |
LDUser.Builder |
privateCustom(java.lang.String k,
java.lang.String v)
Add a
String -valued custom attribute. |
LDUser.Builder |
privateCustomNumber(java.lang.String k,
java.util.List<java.lang.Number> vs)
Add a list of
Integer -valued custom attributes. |
LDUser.Builder |
privateCustomString(java.lang.String k,
java.util.List<java.lang.String> vs)
Add a list of
String -valued custom attributes. |
LDUser.Builder |
privateEmail(java.lang.String email)
Sets the user's e-mail address.
|
LDUser.Builder |
privateFirstName(java.lang.String firstName)
Sets the user's first name.
|
LDUser.Builder |
privateIp(java.lang.String s)
Set the IP for a user.
|
LDUser.Builder |
privateLastName(java.lang.String lastName)
Sets the user's last name.
|
LDUser.Builder |
privateName(java.lang.String name)
Sets the user's full name.
|
LDUser.Builder |
privateSecondary(java.lang.String s) |
LDUser.Builder |
secondary(java.lang.String s) |
public Builder(java.lang.String key)
key
- the unique key for this userpublic Builder(LDUser user)
public LDUser.Builder ip(java.lang.String s)
s
- the IP address for the userpublic LDUser.Builder privateIp(java.lang.String s)
s
- the IP address for the userpublic LDUser.Builder secondary(java.lang.String s)
public LDUser.Builder privateSecondary(java.lang.String s)
public LDUser.Builder country(java.lang.String s)
s
- the country for the userpublic LDUser.Builder privateCountry(java.lang.String s)
s
- the country for the user@Deprecated public LDUser.Builder country(LDCountryCode country)
country(String)
instead.country
- the country for the user@Deprecated public LDUser.Builder privateCountry(LDCountryCode country)
privateCountry(String)
instead.country
- the country for the userpublic LDUser.Builder firstName(java.lang.String firstName)
firstName
- the user's first namepublic LDUser.Builder privateFirstName(java.lang.String firstName)
firstName
- the user's first namepublic LDUser.Builder anonymous(boolean anonymous)
anonymous
- whether the user is anonymouspublic LDUser.Builder lastName(java.lang.String lastName)
lastName
- the user's last namepublic LDUser.Builder privateLastName(java.lang.String lastName)
lastName
- the user's last namepublic LDUser.Builder name(java.lang.String name)
name
- the user's full namepublic LDUser.Builder privateName(java.lang.String name)
name
- the user's full namepublic LDUser.Builder avatar(java.lang.String avatar)
avatar
- the user's avatarpublic LDUser.Builder privateAvatar(java.lang.String avatar)
avatar
- the user's avatarpublic LDUser.Builder email(java.lang.String email)
email
- the e-mail addresspublic LDUser.Builder privateEmail(java.lang.String email)
email
- the e-mail addresspublic LDUser.Builder custom(java.lang.String k, java.lang.String v)
String
-valued custom attribute. When set to one of the
built-in user attribute keys, this custom attribute will be ignored.k
- the key for the custom attribute.v
- the value for the custom attributepublic LDUser.Builder privateCustom(java.lang.String k, java.lang.String v)
String
-valued custom attribute. When set to one of the
built-in user attribute keys, this custom attribute will be ignored. Private
attributes are not recorded in events.k
- the key for the custom attribute.v
- the value for the custom attributepublic LDUser.Builder custom(java.lang.String k, java.lang.Number n)
Number
-valued custom attribute. When set to one of the
built-in user attribute keys, this custom attribute will be ignored.k
- the key for the custom attribute. When set to one of the built-in user attribute
keys, this custom attribute will be ignored.n
- the value for the custom attributepublic LDUser.Builder privateCustom(java.lang.String k, java.lang.Number n)
Number
-valued custom attribute. When set to one of the
built-in user attribute keys, this custom attribute will be ignored. Private
attributes are not recorded in events.k
- the key for the custom attribute. When set to one of the built-in user attribute
keys, this custom attribute will be ignored.n
- the value for the custom attributepublic LDUser.Builder custom(java.lang.String k, java.lang.Boolean b)
Boolean
-valued custom attribute. When set to one of the
built-in user attribute keys, this custom attribute will be ignored.k
- the key for the custom attribute. When set to one of the built-in user attribute
keys, this custom attribute will be ignored.b
- the value for the custom attributepublic LDUser.Builder privateCustom(java.lang.String k, java.lang.Boolean b)
Boolean
-valued custom attribute. When set to one of the
built-in user attribute keys, this custom attribute will be ignored. Private
attributes are not recorded in events.k
- the key for the custom attribute. When set to one of the built-in user attribute
keys, this custom attribute will be ignored.b
- the value for the custom attributepublic LDUser.Builder custom(java.lang.String k, java.util.List<java.lang.String> vs)
customString
String
-valued custom attributes. When set to one of the
built-in user attribute keys, this custom attribute will be ignored.k
- the key for the list. When set to one of the built-in user attribute keys, this
custom attribute will be ignored.vs
- the values for the attributepublic LDUser.Builder customString(java.lang.String k, java.util.List<java.lang.String> vs)
String
-valued custom attributes. When set to one of the
built-in user attribute keys, this custom attribute will be ignored.k
- the key for the list. When set to one of the built-in user attribute keys, this
custom attribute will be ignored.vs
- the values for the attributepublic LDUser.Builder privateCustomString(java.lang.String k, java.util.List<java.lang.String> vs)
String
-valued custom attributes. When set to one of the
built-in user attribute keys, this custom attribute will be ignored. Private
attributes are not recorded in events.k
- the key for the list. When set to one of the built-in user attribute keys, this
custom attribute will be ignored.vs
- the values for the attributepublic LDUser.Builder customNumber(java.lang.String k, java.util.List<java.lang.Number> vs)
Integer
-valued custom attributes. When set to one of the
built-in user attribute keys, this custom attribute will be ignored.k
- the key for the list. When set to one of the built-in user attribute keys, this
custom attribute will be ignored.vs
- the values for the attributepublic LDUser.Builder privateCustomNumber(java.lang.String k, java.util.List<java.lang.Number> vs)
Integer
-valued custom attributes. When set to one of the
built-in user attribute keys, this custom attribute will be ignored. Private
attributes are not recorded in events.k
- the key for the list. When set to one of the built-in user attribute keys, this
custom attribute will be ignored.vs
- the values for the attribute