Package com.batch.android
Class BatchEventData
- java.lang.Object
-
- com.batch.android.BatchEventData
-
public class BatchEventData extends java.lang.ObjectObject holding data to be associated to an event Keys should be made of letters, numbers or underscores ([a-z0-9_]) and can't be longer than 30 characters.
-
-
Constructor Summary
Constructors Constructor Description BatchEventData()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BatchEventDataaddTag(java.lang.String tag)Add a tagBatchEventDataput(java.lang.String key, boolean value)Add a boolean attribute for the specified keyBatchEventDataput(java.lang.String key, double value)Add a double attribute for the specified keyBatchEventDataput(java.lang.String key, float value)Add a float attribute for the specified keyBatchEventDataput(java.lang.String key, int value)Add a integer attribute for the specified keyBatchEventDataput(java.lang.String key, long value)Add a long attribute for the specified keyBatchEventDataput(java.lang.String key, java.lang.String value)Add a string attribute for the specified keyBatchEventDataput(java.lang.String key, java.net.URI value)Add an URL attribute for the specified keyBatchEventDataput(java.lang.String key, java.util.Date value)Add a date attribute for the specified key
-
-
-
Method Detail
-
addTag
public BatchEventData addTag(java.lang.String tag)
Add a tag- Parameters:
tag- Tag to add. Can't be longer than 64 characters, and can't be empty or null. For better results, you should trim/lowercase your strings, and use slugs when possible.- Returns:
- Same BatchEventData instance, for chaining
-
put
public BatchEventData put(java.lang.String key, java.lang.String value)
Add a string attribute for the specified key- Parameters:
key- Attribute key. Should be made of letters, numbers or underscores ([a-z0-9_]) and can't be longer than 30 characters.value- String value to add. Can't be longer than 64 characters, and can't be empty or null. For better results, you should trim/lowercase your strings, and use slugs when possible.- Returns:
- Same BatchEventData instance, for chaining
-
put
public BatchEventData put(java.lang.String key, java.net.URI value)
Add an URL attribute for the specified key- Parameters:
key- Attribute key. Should be made of letters, numbers or underscores ([a-z0-9_]) and can't be longer than 30 characters.value- URL value to add. Can't be longer than 2048 characters, and can't be empty or null.- Returns:
- Same BatchEventData instance, for chaining
-
put
public BatchEventData put(java.lang.String key, float value)
Add a float attribute for the specified key- Parameters:
key- Attribute key. Should be made of letters, numbers or underscores ([a-z0-9_]) and can't be longer than 30 characters.value- Float value to add.- Returns:
- Same BatchEventData instance, for chaining
-
put
public BatchEventData put(java.lang.String key, double value)
Add a double attribute for the specified key- Parameters:
key- Attribute key. Should be made of letters, numbers or underscores ([a-z0-9_]) and can't be longer than 30 characters.value- Double value to add.- Returns:
- Same BatchEventData instance, for chaining
-
put
public BatchEventData put(java.lang.String key, int value)
Add a integer attribute for the specified key- Parameters:
key- Attribute key. Should be made of letters, numbers or underscores ([a-z0-9_]) and can't be longer than 30 characters.value- Integer value to add.- Returns:
- Same BatchEventData instance, for chaining
-
put
public BatchEventData put(java.lang.String key, long value)
Add a long attribute for the specified key- Parameters:
key- Attribute key. Should be made of letters, numbers or underscores ([a-z0-9_]) and can't be longer than 30 characters.value- Long value to add.- Returns:
- Same BatchEventData instance, for chaining
-
put
public BatchEventData put(java.lang.String key, boolean value)
Add a boolean attribute for the specified key- Parameters:
key- Attribute key. Should be made of letters, numbers or underscores ([a-z0-9_]) and can't be longer than 30 characters.value- Boolean value to add.- Returns:
- Same BatchEventData instance, for chaining
-
put
public BatchEventData put(java.lang.String key, java.util.Date value)
Add a date attribute for the specified key- Parameters:
key- Attribute key. Should be made of letters, numbers or underscores ([a-z0-9_]) and can't be longer than 30 characters.value- Date value to add.- Returns:
- Same BatchEventData instance, for chaining
-
-