java.lang.Object | |
↳ | com.apptimize.ApptimizeVar<T> |
An Apptimize variable whose value can be changed in A/B experiments.
We can create them using the create
factory methods (e.g.,
createString(String, String)
,
createMapOfDoubles(String, java.util.Map)
).
We can get the value of an Apptimize variable using value()
. This
value will vary depending on what A/B experiment variants this device is
currently enrolled in.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
static ApptimizeVar<Boolean> |
createBoolean(String name, Boolean defaultValue)
Creates an
ApptimizeVar with a Boolean value. | ||||||||||
static ApptimizeVar<Double> |
createDouble(String name, Double defaultValue)
Creates an
ApptimizeVar with a Double value. | ||||||||||
static ApptimizeVar<Integer> |
createInteger(String name, Integer defaultValue)
Creates an
ApptimizeVar with an Integer value. | ||||||||||
static ApptimizeVar<List<Boolean>> |
createListOfBooleans(String name, List<Boolean> defaultValue)
Creates an | ||||||||||
static ApptimizeVar<List<Double>> |
createListOfDoubles(String name, List<Double> defaultValue)
Creates an | ||||||||||
static ApptimizeVar<List<Integer>> |
createListOfIntegers(String name, List<Integer> defaultValue)
Creates an | ||||||||||
static ApptimizeVar<List<String>> |
createListOfStrings(String name, List<String> defaultValue)
Creates an | ||||||||||
static ApptimizeVar<Map<String, Boolean>> |
createMapOfBooleans(String name, Map<String, Boolean> defaultValue)
Creates an | ||||||||||
static ApptimizeVar<Map<String, Double>> |
createMapOfDoubles(String name, Map<String, Double> defaultValue)
Creates an | ||||||||||
static ApptimizeVar<Map<String, Integer>> |
createMapOfIntegers(String name, Map<String, Integer> defaultValue)
Creates an | ||||||||||
static ApptimizeVar<Map<String, String>> |
createMapOfStrings(String name, Map<String, String> defaultValue)
Creates an | ||||||||||
static ApptimizeVar<String> |
createString(String name, String defaultValue)
Creates an
ApptimizeVar with a String value. | ||||||||||
boolean | equals(Object o) | ||||||||||
int | hashCode() | ||||||||||
T |
value()
Gets the current value of this
ApptimizeVar . | ||||||||||
T |
value(ApptimizeOptions options)
Gets the current value of this
ApptimizeVar . |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Creates an ApptimizeVar
with a Boolean
value.
name | The name of this ApptimizeVar , as it will appear when
configuring A/B experiments at https://apptimize.com/admin/ |
---|---|
defaultValue | The value of this ApptimizeVar if this device is not
enrolled in any A/B experiments that affect this variable. |
ApptimizeVar<Boolean>
.NullPointerException | If the specified name is null .
|
---|
Creates an ApptimizeVar
with a Double
value.
name | The name of this ApptimizeVar , as it will appear when
configuring A/B experiments at https://apptimize.com/admin/ |
---|---|
defaultValue | The value of this ApptimizeVar if this device is not
enrolled in any A/B experiments that affect this variable. |
ApptimizeVar<Double>
.NullPointerException | If the specified name is null .
|
---|
Creates an ApptimizeVar
with an Integer
value.
name | The name of this ApptimizeVar , as it will appear when
configuring A/B experiments at https://apptimize.com/admin/ |
---|---|
defaultValue | The value of this ApptimizeVar if this device is not
enrolled in any A/B experiments that affect this variable. |
ApptimizeVar<Integer>
.NullPointerException | If the specified name is null .
|
---|
Creates an ApptimizeVar
with a List<Boolean>
value.
Note that when the ApptimizeVar
is created, its default value
will be set to a copy of the input defaultValue
rather than to
the original object. Any subsequent changes to the original input object
will not modify the default value of the returned ApptimizeVar
.
name | The name of this ApptimizeVar , as it will appear when
configuring A/B experiments at https://apptimize.com/admin/ |
---|---|
defaultValue | The value of this ApptimizeVar if this device is not
enrolled in any A/B experiments that affect this variable. |
ApptimizeVar<List<Boolean>>
.NullPointerException | If the specified name is null .
|
---|
Creates an ApptimizeVar
with a List<Double>
value.
Note that when the ApptimizeVar
is created, its default value
will be set to a copy of the input defaultValue
rather than to
the original object. Any subsequent changes to the original input object
will not modify the default value of the returned ApptimizeVar
.
name | The name of this ApptimizeVar , as it will appear when
configuring A/B experiments at https://apptimize.com/admin/ |
---|---|
defaultValue | The value of this ApptimizeVar if this device is not
enrolled in any A/B experiments that affect this variable. |
ApptimizeVar<List<Double>>
.NullPointerException | If the specified name is null .
|
---|
Creates an ApptimizeVar
with a List<Integer>
value.
Note that when the ApptimizeVar
is created, its default value
will be set to a copy of the input defaultValue
rather than to
the original object. Any subsequent changes to the original input object
will not modify the default value of the returned ApptimizeVar
.
name | The name of this ApptimizeVar , as it will appear when
configuring A/B experiments at https://apptimize.com/admin/ |
---|---|
defaultValue | The value of this ApptimizeVar if this device is not
enrolled in any A/B experiments that affect this variable. |
ApptimizeVar<List<Integer>>
.NullPointerException | If the specified name is null .
|
---|
Creates an ApptimizeVar
with a List<String>
value.
Note that when the ApptimizeVar
is created, its default value
will be set to a copy of the input defaultValue
rather than to
the original object. Any subsequent changes to the original input object
will not modify the default value of the returned ApptimizeVar
.
name | The name of this ApptimizeVar , as it will appear when
configuring A/B experiments at https://apptimize.com/admin/ |
---|---|
defaultValue | The value of this ApptimizeVar if this device is not
enrolled in any A/B experiments that affect this variable. |
ApptimizeVar<List<String>>
.NullPointerException | If the specified name is null .
|
---|
Creates an ApptimizeVar
with a Map<String, Boolean>
value.
Note that when the ApptimizeVar
is created, its default value
will be set to a copy of the input defaultValue
rather than to
the original object. Any subsequent changes to the original input object
will not modify the default value of the returned ApptimizeVar
.
name | The name of this ApptimizeVar , as it will appear when
configuring A/B experiments at https://apptimize.com/admin/ |
---|---|
defaultValue | The value of this ApptimizeVar if this device is not
enrolled in any A/B experiments that affect this variable. |
ApptimizeVar<Map<String, Boolean>>
.NullPointerException | If the specified name is null .
|
---|
Creates an ApptimizeVar
with a Map<String, Double>
value.
Note that when the ApptimizeVar
is created, its default value
will be set to a copy of the input defaultValue
rather than to
the original object. Any subsequent changes to the original input object
will not modify the default value of the returned ApptimizeVar
.
name | The name of this ApptimizeVar , as it will appear when
configuring A/B experiments at https://apptimize.com/admin/ |
---|---|
defaultValue | The value of this ApptimizeVar if this device is not
enrolled in any A/B experiments that affect this variable. |
ApptimizeVar<Map<String, Double>>
.NullPointerException | If the specified name is null .
|
---|
Creates an ApptimizeVar
with a Map<String, Integer>
value.
Note that when the ApptimizeVar
is created, its default value
will be set to a copy of the input defaultValue
rather than to
the original object. Any subsequent changes to the original input object
will not modify the default value of the returned ApptimizeVar
.
name | The name of this ApptimizeVar , as it will appear when
configuring A/B experiments at https://apptimize.com/admin/ |
---|---|
defaultValue | The value of this ApptimizeVar if this device is not
enrolled in any A/B experiments that affect this variable. |
ApptimizeVar<Map<String, Integer>>
.NullPointerException | If the specified name is null .
|
---|
Creates an ApptimizeVar
with a Map<String, String>
value.
Note that when the ApptimizeVar
is created, its default value
will be set to a copy of the input defaultValue
rather than to
the original object. Any subsequent changes to the original input object
will not modify the default value of the returned ApptimizeVar
.
name | The name of this ApptimizeVar , as it will appear when
configuring A/B experiments at https://apptimize.com/admin/ |
---|---|
defaultValue | The value of this ApptimizeVar if this device is not
enrolled in any A/B experiments that affect this variable. |
ApptimizeVar<Map<String, String>>
.NullPointerException | If the specified name is null .
|
---|
Creates an ApptimizeVar
with a String
value.
name | The name of this ApptimizeVar , as it will appear when
configuring A/B experiments at https://apptimize.com/admin/ |
---|---|
defaultValue | The value of this ApptimizeVar if this device is not
enrolled in any A/B experiments that affect this variable. |
ApptimizeVar<String>
.NullPointerException | If the specified name is null .
|
---|
Gets the current value of this ApptimizeVar
. This value will vary
depending on what A/B experiment variants this device is currently
enrolled in. If this device is not enrolled in any A/B experiments that
affect this ApptimizeVar
, this method will return the default
value of this ApptimizeVar
.
Note that even if you call this method and perform modifications on the
returned value, subsequent calls to this method will still return new
objects without these modifications.
ApptimizeVar
for this device.
Gets the current value of this ApptimizeVar
. This value will vary
depending on what A/B experiment variants this device is currently
enrolled in. If this device is not enrolled in any A/B experiments that
affect this ApptimizeVar
, this method will return the default
value of this ApptimizeVar
.
Note that if you call this method and perform modifications on the
returned value, subsequent calls to this method will return new objects
without these modifications.
Options can be configured using the input
ApptimizeOptions
.
options | Options for configuring this method. See
ApptimizeOptions |
---|
ApptimizeVar
for this device.