Package com.featureprobe.sdk.server
Class FPUser
- java.lang.Object
-
- com.featureprobe.sdk.server.FPUser
-
public class FPUser extends Object
A collection of attributes that can affect toggle evaluation, usually corresponding to a user of your application.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containAttr(String name)
Check attribute existsString
getAttr(String name)
Get the specified attribute valueMap<String,String>
getAttrs()
Get FPUser all attributeString
getKey()
Get FPUser unique identifiervoid
setAttrs(Map<String,String> attrs)
Add multiple attribute to the userFPUser
stableRollout(String key)
Set user unique id for percentage rolloutFPUser
with(String name, String value)
Add an attribute to the user
-
-
-
Constructor Detail
-
FPUser
public FPUser()
Creates a new FPUser
-
FPUser
@Deprecated public FPUser(String key)
Deprecated.Creates a new FPUser- Parameters:
key
- user unique id for percentage rollout
-
-
Method Detail
-
stableRollout
public FPUser stableRollout(String key)
Set user unique id for percentage rollout- Parameters:
key
- user unique id for percentage rollout
-
with
public FPUser with(String name, String value)
Add an attribute to the user- Parameters:
name
- attribute namevalue
- attribute value- Returns:
- the FPUser
-
containAttr
public boolean containAttr(String name)
Check attribute exists- Parameters:
name
- attribute name- Returns:
-
getKey
public String getKey()
Get FPUser unique identifier- Returns:
- key
-
setAttrs
public void setAttrs(Map<String,String> attrs)
Add multiple attribute to the user- Parameters:
attrs
- attribute set
-
-