public class Identify
extends java.lang.Object
Identify identify = new Identify().set("color", "green").add("karma", 1);
Amplitude.getInstance().identify(identify);
and pass in the object.Modifier and Type | Field and Description |
---|---|
protected java.util.Set<java.lang.String> |
userProperties
Internal set to keep track of user property keys and test for duplicates.
|
protected org.json.JSONObject |
userPropertiesOperations
Internal
JSONObject to hold all of the user property operations. |
Constructor and Description |
---|
Identify() |
Modifier and Type | Method and Description |
---|---|
Identify |
add(java.lang.String property,
double value)
Increment a user property by some numerical value.
|
Identify |
add(java.lang.String property,
float value)
Increment a user property by some numerical value.
|
Identify |
add(java.lang.String property,
int value)
Increment a user property by some numerical value.
|
Identify |
add(java.lang.String property,
org.json.JSONObject values)
Increment a user property by some numerical value.
|
Identify |
add(java.lang.String property,
long value)
Increment a user property by some numerical value.
|
Identify |
add(java.lang.String property,
java.lang.String value)
Increment a user property by some numerical value.
|
Identify |
append(java.lang.String property,
boolean value)
Append a value or values to a user property.
|
Identify |
append(java.lang.String property,
boolean[] values)
Append a value or values to a user property.
|
Identify |
append(java.lang.String property,
double value)
Append a value or values to a user property.
|
Identify |
append(java.lang.String property,
double[] values)
Append a value or values to a user property.
|
Identify |
append(java.lang.String property,
float value)
Append a value or values to a user property.
|
Identify |
append(java.lang.String property,
float[] values)
Append a value or values to a user property.
|
Identify |
append(java.lang.String property,
int value)
Append a value or values to a user property.
|
Identify |
append(java.lang.String property,
int[] values)
Append a value or values to a user property.
|
Identify |
append(java.lang.String property,
org.json.JSONArray values)
Append a value or values to a user property.
|
Identify |
append(java.lang.String property,
org.json.JSONObject values)
Append a value or values to a user property.
|
Identify |
append(java.lang.String property,
long value)
Append a value or values to a user property.
|
Identify |
append(java.lang.String property,
long[] values)
Append a value or values to a user property.
|
Identify |
append(java.lang.String property,
java.lang.String value)
Append a value or values to a user property.
|
Identify |
append(java.lang.String property,
java.lang.String[] values)
Append a value or values to a user property.
|
Identify |
clearAll()
Clear all user properties.
|
org.json.JSONObject |
getUserPropertiesOperations()
Public method that exposes the user property operations JSON blob.
|
Identify |
prepend(java.lang.String property,
boolean value)
Prepend a value or values to a user property.
|
Identify |
prepend(java.lang.String property,
boolean[] values)
Prepend a value or values to a user property.
|
Identify |
prepend(java.lang.String property,
double value)
Prepend a value or values to a user property.
|
Identify |
prepend(java.lang.String property,
double[] values)
Prepend a value or values to a user property.
|
Identify |
prepend(java.lang.String property,
float value)
Prepend a value or values to a user property.
|
Identify |
prepend(java.lang.String property,
float[] values)
Prepend a value or values to a user property.
|
Identify |
prepend(java.lang.String property,
int value)
Prepend a value or values to a user property.
|
Identify |
prepend(java.lang.String property,
int[] values)
Prepend a value or values to a user property.
|
Identify |
prepend(java.lang.String property,
org.json.JSONArray values)
Prepend a value or values to a user property.
|
Identify |
prepend(java.lang.String property,
org.json.JSONObject values)
Prepend a value or values to a user property.
|
Identify |
prepend(java.lang.String property,
long value)
Prepend a value or values to a user property.
|
Identify |
prepend(java.lang.String property,
long[] values)
Prepend a value or values to a user property.
|
Identify |
prepend(java.lang.String property,
java.lang.String value)
Prepend a value or values to a user property.
|
Identify |
prepend(java.lang.String property,
java.lang.String[] values)
Prepend a value or values to a user property.
|
Identify |
set(java.lang.String property,
boolean value)
Sets a user property value.
|
Identify |
set(java.lang.String property,
boolean[] values)
Sets a user property value.
|
Identify |
set(java.lang.String property,
double value)
Sets a user property value.
|
Identify |
set(java.lang.String property,
double[] values)
Sets a user property value.
|
Identify |
set(java.lang.String property,
float value)
Sets a user property value.
|
Identify |
set(java.lang.String property,
float[] values)
Sets a user property value.
|
Identify |
set(java.lang.String property,
int value)
Sets a user property value.
|
Identify |
set(java.lang.String property,
int[] values)
Sets a user property value.
|
Identify |
set(java.lang.String property,
org.json.JSONArray values)
Sets a user property value.
|
Identify |
set(java.lang.String property,
org.json.JSONObject values)
Sets a user property value.
|
Identify |
set(java.lang.String property,
long value)
Sets a user property value.
|
Identify |
set(java.lang.String property,
long[] values)
Sets a user property value.
|
Identify |
set(java.lang.String property,
java.lang.Object value)
Deprecated.
|
Identify |
set(java.lang.String property,
java.lang.String value)
Sets a user property value.
|
Identify |
set(java.lang.String property,
java.lang.String[] values)
Sets a user property value.
|
Identify |
setOnce(java.lang.String property,
boolean value)
Sets a user property value only once.
|
Identify |
setOnce(java.lang.String property,
boolean[] values)
Sets a user property value only once.
|
Identify |
setOnce(java.lang.String property,
double value)
Sets a user property value only once.
|
Identify |
setOnce(java.lang.String property,
double[] values)
Sets a user property value only once.
|
Identify |
setOnce(java.lang.String property,
float value)
Sets a user property value only once.
|
Identify |
setOnce(java.lang.String property,
float[] values)
Sets a user property value only once.
|
Identify |
setOnce(java.lang.String property,
int value)
Sets a user property value only once.
|
Identify |
setOnce(java.lang.String property,
int[] values)
Sets a user property value only once.
|
Identify |
setOnce(java.lang.String property,
org.json.JSONArray values)
Sets a user property value only once.
|
Identify |
setOnce(java.lang.String property,
org.json.JSONObject values)
Sets a user property value only once.
|
Identify |
setOnce(java.lang.String property,
long value)
Sets a user property value only once.
|
Identify |
setOnce(java.lang.String property,
long[] values)
Sets a user property value only once.
|
Identify |
setOnce(java.lang.String property,
java.lang.Object value)
Deprecated.
|
Identify |
setOnce(java.lang.String property,
java.lang.String value)
Sets a user property value only once.
|
Identify |
setOnce(java.lang.String property,
java.lang.String[] values)
Sets a user property value only once.
|
Identify |
unset(java.lang.String property)
Unset and remove a user property.
|
protected org.json.JSONObject userPropertiesOperations
JSONObject
to hold all of the user property operations.protected java.util.Set<java.lang.String> userProperties
public Identify setOnce(java.lang.String property, boolean value)
property
- the user property to setOncevalue
- the value of the user propertypublic Identify setOnce(java.lang.String property, double value)
property
- the user property to setOncevalue
- the value of the user propertypublic Identify setOnce(java.lang.String property, float value)
property
- the user property to setOncevalue
- the value of the user propertypublic Identify setOnce(java.lang.String property, int value)
property
- the user property to setOncevalue
- the value of the user propertypublic Identify setOnce(java.lang.String property, long value)
property
- the user property to setOncevalue
- the value of the user propertypublic Identify setOnce(java.lang.String property, java.lang.String value)
property
- the user property to setOncevalue
- the value of the user propertypublic Identify setOnce(java.lang.String property, org.json.JSONArray values)
property
- the user property to setOncevalues
- the value of the user propertypublic Identify setOnce(java.lang.String property, org.json.JSONObject values)
property
- the user property to setOncevalues
- the value of the user propertypublic Identify setOnce(java.lang.String property, boolean[] values)
property
- the user property to setOncevalues
- the value of the user propertypublic Identify setOnce(java.lang.String property, double[] values)
property
- the user property to setOncevalues
- the value of the user propertypublic Identify setOnce(java.lang.String property, float[] values)
property
- the user property to setOncevalues
- the value of the user propertypublic Identify setOnce(java.lang.String property, int[] values)
property
- the user property to setOncevalues
- the value of the user propertypublic Identify setOnce(java.lang.String property, long[] values)
property
- the user property to setOncevalues
- the value of the user propertypublic Identify setOnce(java.lang.String property, java.lang.String[] values)
property
- the user property to setOncevalues
- the value of the user propertypublic Identify set(java.lang.String property, boolean value)
property
- the user property to setvalue
- the value of the user propertypublic Identify set(java.lang.String property, double value)
property
- the user property to setvalue
- the value of the user propertypublic Identify set(java.lang.String property, float value)
property
- the user property to setvalue
- the value of the user propertypublic Identify set(java.lang.String property, int value)
property
- the user property to setvalue
- the value of the user propertypublic Identify set(java.lang.String property, long value)
property
- the user property to setvalue
- the value of the user propertypublic Identify set(java.lang.String property, java.lang.String value)
property
- the user property to setvalue
- the value of the user propertypublic Identify set(java.lang.String property, org.json.JSONObject values)
property
- the user property to setvalues
- the value of the user propertypublic Identify set(java.lang.String property, org.json.JSONArray values)
property
- the user property to setvalues
- the value of the user propertypublic Identify set(java.lang.String property, boolean[] values)
property
- the user property to setvalues
- the value of the user propertypublic Identify set(java.lang.String property, double[] values)
property
- the user property to setvalues
- the value of the user propertypublic Identify set(java.lang.String property, float[] values)
property
- the user property to setvalues
- the value of the user propertypublic Identify set(java.lang.String property, int[] values)
property
- the user property to setvalues
- the value of the user propertypublic Identify set(java.lang.String property, long[] values)
property
- the user property to setvalues
- the value of the user propertypublic Identify set(java.lang.String property, java.lang.String[] values)
property
- the user property to setvalues
- the value of the user propertypublic Identify add(java.lang.String property, double value)
property
- the user property to incrementvalue
- the value (can be negative) to incrementpublic Identify add(java.lang.String property, float value)
property
- the user property to incrementvalue
- the value (can be negative) to incrementpublic Identify add(java.lang.String property, int value)
property
- the user property to incrementvalue
- the value (can be negative) to incrementpublic Identify add(java.lang.String property, long value)
property
- the user property to incrementvalue
- the value (can be negative) to incrementpublic Identify add(java.lang.String property, java.lang.String value)
property
- the user property to incrementvalue
- the value (can be negative) to increment. Server-side we convert
the string into a number if possible.public Identify add(java.lang.String property, org.json.JSONObject values)
property
- the user property to incrementvalues
- the value (can be negative) to increment. Server-side we flatten
dictionaries and apply add to each flattened property value.public Identify append(java.lang.String property, boolean value)
property
- the user property property to which to appendvalue
- the value being appendedpublic Identify append(java.lang.String property, double value)
property
- the user property property to which to appendvalue
- the value being appendedpublic Identify append(java.lang.String property, float value)
property
- the user property property to which to appendvalue
- the value being appendedpublic Identify append(java.lang.String property, int value)
property
- the user property property to which to appendvalue
- the value being appendedpublic Identify append(java.lang.String property, long value)
property
- the user property property to which to appendvalue
- the value being appendedpublic Identify append(java.lang.String property, java.lang.String value)
property
- the user property property to which to appendvalue
- the value being appendedpublic Identify append(java.lang.String property, org.json.JSONArray values)
property
- the user property property to which to appendvalues
- the values being appendedpublic Identify append(java.lang.String property, org.json.JSONObject values)
property
- the user property property to which to appendvalues
- the values being appended. Server-side we flatten dictionaries and apply
append to each flattened property.public Identify append(java.lang.String property, boolean[] values)
property
- the user property property to which to appendvalues
- the values being appendedpublic Identify append(java.lang.String property, double[] values)
property
- the user property property to which to appendvalues
- the values being appendedpublic Identify append(java.lang.String property, float[] values)
property
- the user property property to which to appendvalues
- the values being appendedpublic Identify append(java.lang.String property, int[] values)
property
- the user property property to which to appendvalues
- the values being appendedpublic Identify append(java.lang.String property, long[] values)
property
- the user property property to which to appendvalues
- the values being appendedpublic Identify append(java.lang.String property, java.lang.String[] values)
property
- the user property property to which to appendvalues
- the values being appendedpublic Identify prepend(java.lang.String property, boolean value)
property
- the user property to which to appendvalue
- the value being prependedpublic Identify prepend(java.lang.String property, double value)
property
- the user property to which to appendvalue
- the value being prependedpublic Identify prepend(java.lang.String property, float value)
property
- the user property to which to appendvalue
- the value being prependedpublic Identify prepend(java.lang.String property, int value)
property
- the user property to which to appendvalue
- the value being prependedpublic Identify prepend(java.lang.String property, long value)
property
- the user property to which to appendvalue
- the value being prependedpublic Identify prepend(java.lang.String property, java.lang.String value)
property
- the user property to which to appendvalue
- the value being prependedpublic Identify prepend(java.lang.String property, org.json.JSONArray values)
property
- the user property to which to appendvalues
- the value being prependedpublic Identify prepend(java.lang.String property, org.json.JSONObject values)
property
- the user property to which to appendvalues
- the values being prepended. Server-side we flatten dictionaries and apply
prepend to each flattened property.public Identify prepend(java.lang.String property, boolean[] values)
property
- the user property to which to appendvalues
- the values being prependedpublic Identify prepend(java.lang.String property, double[] values)
property
- the user property to which to appendvalues
- the values being prependedpublic Identify prepend(java.lang.String property, float[] values)
property
- the user property to which to appendvalues
- the values being prependedpublic Identify prepend(java.lang.String property, int[] values)
property
- the user property to which to appendvalues
- the values being prependedpublic Identify prepend(java.lang.String property, long[] values)
property
- the user property to which to appendvalues
- the values being prependedpublic Identify prepend(java.lang.String property, java.lang.String[] values)
property
- the user property to which to appendvalues
- the values being prependedpublic Identify unset(java.lang.String property)
property
- the user property to unset and remove.public Identify clearAll()
public Identify setOnce(java.lang.String property, java.lang.Object value)
property
- the user property to setOncevalue
- the value of the user propertypublic Identify set(java.lang.String property, java.lang.Object value)
property
- the user property to setvalue
- the value of the user propertypublic org.json.JSONObject getUserPropertiesOperations()