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 booleancontainAttr(String name)Check attribute existsStringgetAttr(String name)Get the specified attribute valueMap<String,String>getAttrs()Get FPUser all attributeStringgetKey()Get FPUser unique identifiervoidsetAttrs(Map<String,String> attrs)Add multiple attribute to the userFPUserstableRollout(String key)Set user unique id for percentage rolloutFPUserwith(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
-
-