Package 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 Description UserProfileUpdate<? extends com.yandex.metrica.impl.profile.UserProfileUpdatePatcher>withDelta(double value)Updates the counter attribute value with the specified delta value.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Method Details
-
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
UserProfileUpdateobject
-