com.yandex.metrica.profile
Class StringAttribute
java.lang.Object
com.yandex.metrica.profile.StringAttribute
- Direct Known Subclasses:
- NameAttribute
public class StringAttribute
extends java.lang.Object
Методы класса задают значение строкового атрибута.
ПРИМЕР:
UserProfile userProfile = new UserProfile.Builder()
.apply(Attribute.customString("favorite_country").withValue("Russia"))
.build();
Method Summary
Modifier and Type | Method and Description |
---|---|
UserProfileUpdate<? extends com.yandex.metrica.impl.profile.UserProfileUpdatePatcher> | withValue(java.lang.String value)
Обновляет значение атрибута.
|
UserProfileUpdate<? extends com.yandex.metrica.impl.profile.UserProfileUpdatePatcher> | withValueIfUndefined(java.lang.String value)
Обновляет значение атрибута, если оно не было установлено ранее.
|
UserProfileUpdate<? extends com.yandex.metrica.impl.profile.UserProfileUpdatePatcher> | withValueReset()
Сбрасывает значение атрибута.
|
Method Detail
withValue
@NonNull public UserProfileUpdate<? extends com.yandex.metrica.impl.profile.UserProfileUpdatePatcher> withValue(@NonNull java.lang.String value)
Обновляет значение атрибута.
- Parameters:
value
- Значение атрибута в виде строки. Максимальная длина значения — 200 символов.- Returns:
- Объект
UserProfileUpdate
, который содержит все обновления атрибутов.
withValueIfUndefined
@NonNull public UserProfileUpdate<? extends com.yandex.metrica.impl.profile.UserProfileUpdatePatcher> withValueIfUndefined(@NonNull java.lang.String value)
Обновляет значение атрибута, если оно не было установлено ранее. Не перезаписывает значение атрибута, если оно было установлено.
- Parameters:
value
- Значение атрибута в виде строки. Максимальная длина значения — 200 символов.- Returns:
- Объект
UserProfileUpdate
, который содержит все обновления атрибутов.
withValueReset
@NonNull public UserProfileUpdate<? extends com.yandex.metrica.impl.profile.UserProfileUpdatePatcher> withValueReset()
Сбрасывает значение атрибута.
- Returns:
- Объект
UserProfileUpdate
, который содержит все обновления атрибутов.