Go to console

AnswersEvent

public abstract class AnswersEvent extends Object
Known Direct Subclasses
Known Indirect Subclasses

Representation of an Answers event. Answers events include both custom and predefined events.

Constant Summary

int MAX_NUM_ATTRIBUTES
int MAX_STRING_LENGTH

Public Constructor Summary

Public Method Summary

T
putCustomAttribute(String key, Number value)
Put Number attribute.
T
putCustomAttribute(String key, String value)
Put String attribute.

Inherited Method Summary

Constants

public static final int MAX_NUM_ATTRIBUTES

Constant Value: 20

public static final int MAX_STRING_LENGTH

Constant Value: 100

Public Constructors

public AnswersEvent ()

Public Methods

public T putCustomAttribute (String key, Number value)

Put Number attribute. Answers uses Number attributes to provide information about the distribution of values over time. A maximum of MAX_NUM_ATTRIBUTES attributes is allowed for each event.

Parameters
key attribute key string, not null, no more than MAX_STRING_LENGTH chars
value attribute value number, not null
Returns
  • this

public T putCustomAttribute (String key, String value)

Put String attribute. Answers uses String attributes as categorical data, allowing comparison across different category values. A maximum of MAX_NUM_ATTRIBUTES attributes is allowed for each event.

Parameters
key attribute key string, not null, no more than MAX_STRING_LENGTH chars
value attribute value string, not null, no more than MAX_STRING_LENGTH chars
Returns
  • this