public final class NumberAttribute
extends java.lang.Object
Методы класса задают значение числового атрибута.

ПРИМЕР:

      UserProfile userProfile = new UserProfile.Builder()
                     .apply(Attribute.customNumber("level").withValue(5d))
                     .build();
 

Method Summary

All Methods
Instance Methods
Concrete Methods
Modifier and TypeMethod and Description
UserProfileUpdate<? extends com.yandex.metrica.impl.profile.UserProfileUpdatePatcher>withValue(double value)
Обновляет значение атрибута.
UserProfileUpdate<? extends com.yandex.metrica.impl.profile.UserProfileUpdatePatcher>withValueIfUndefined(double value)
Обновляет значение атрибута, если оно не было установлено ранее.
UserProfileUpdate<? extends com.yandex.metrica.impl.profile.UserProfileUpdatePatcher>withValueReset()
Сбрасывает значение атрибута.

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail

withValue

@NonNull
public UserProfileUpdate<? extends com.yandex.metrica.impl.profile.UserProfileUpdatePatcher> withValue(double value)
Обновляет значение атрибута.
Parameters:
value - Значение числового атрибута. Тип данных — double.
Returns:
Объект UserProfileUpdate, который содержит все обновления атрибутов.

withValueIfUndefined

@NonNull
public UserProfileUpdate<? extends com.yandex.metrica.impl.profile.UserProfileUpdatePatcher> withValueIfUndefined(double value)
Обновляет значение атрибута, если оно не было установлено ранее. Не перезаписывает значение атрибута, если оно было установлено.
Parameters:
value - Значение числового атрибута. Тип данных — double.
Returns:
Объект UserProfileUpdate, который содержит все обновления атрибутов.

withValueReset

@NonNull
public UserProfileUpdate<? extends com.yandex.metrica.impl.profile.UserProfileUpdatePatcher> withValueReset()
Сбрасывает значение атрибута.
Returns:
Объект UserProfileUpdate, который содержит все обновления атрибутов.