public abstract class Identity extends Object
| Constructor and Description |
|---|
Identity() |
| Modifier and Type | Method and Description |
|---|---|
protected AttributesMap.Builder |
attributes()
Convenience method for getting an attributes map builder
|
abstract AttributesMap |
computeAttributes()
generates a list of attributes that describe this identity for filtering
|
long |
computeHash(int seed,
Set<String> hashAttributes,
AttributesMap attributes)
generates a hash code used to assign identity to treatment
|
static <T extends Identity> |
getSupportedAttributes(Class<T> clazz)
Get a list of possible attribute values that can be returned by this identity
|
protected IdentityBuilder |
identity(int seed)
Convenience method for getting an identity builder given a seed
|
public long computeHash(int seed,
Set<String> hashAttributes,
AttributesMap attributes)
seed - a seed value to randomize the resulting hash from experiment to experiment for the same identityhashAttributes - a set of attributes that should be used to compute the hash codeattributes - a map of attribute valuespublic abstract AttributesMap computeAttributes()
protected IdentityBuilder identity(int seed)
protected AttributesMap.Builder attributes()
Copyright © 2020. All rights reserved.