com.yandex.metrica.profile
Class CounterAttribute
java.lang.Object
com.yandex.metrica.profile.CounterAttribute
public final class CounterAttribute
extends java.lang.Object
The counter attribute class. It enables creating custom counter for the user profile.
EXAMPLE:
CounterAttribute timeLeftAttribute = Attribute.customCounter("time_left"); UserProfile userProfile = new UserProfile.Builder() .apply(Attribute.timeLeftAttribute().withDelta(-10d)) .build();
Method Summary
Modifier and Type | Method and Description |
---|---|
UserProfileUpdate<? extends com.yandex.metrica.impl.profile.UserProfileUpdatePatcher> | withDelta(double value)
Updates the counter attribute value with the specified delta value.
|
Method Detail
withDelta
@NonNull public UserProfileUpdate<? extends com.yandex.metrica.impl.profile.UserProfileUpdatePatcher> withDelta(double value)
Updates the counter attribute value with the specified delta value.
- Parameters:
value
- Delta value to change the counter attribute value- Returns:
- The
UserProfileUpdate
object