BirthDateAttribute class

com.yandex.metrica.profile

public class BirthDateAttribute

Methods of the class set the age or date of birth for the user profile.

Methods

UserProfileUpdate<? extends UserProfileUpdatePatcher> withAge(int age)

Updates the attribute value.

UserProfileUpdate<? extends UserProfileUpdatePatcher> withAgeIfUndefined(int age)

Updates the attribute with the specified value only if the attribute value is undefined.

UserProfileUpdate<? extends UserProfileUpdatePatcher> withBirthDate(@NonNull Calendar date)

Updates the attribute value.

UserProfileUpdate<? extends UserProfileUpdatePatcher> withBirthDate(int year)

Updates the attribute value.

UserProfileUpdate<? extends UserProfileUpdatePatcher> withBirthDate(int year, int month)

Updates the attribute value.

UserProfileUpdate<? extends UserProfileUpdatePatcher> withBirthDate(int year, int month, int dayOfMonth)

Updates the attribute value.

UserProfileUpdate<? extends UserProfileUpdatePatcher> withBirthDateIfUndefined(@NonNull Calendar date)

Updates the attribute with the specified value only if the attribute value is undefined.

UserProfileUpdate<? extends UserProfileUpdatePatcher> withBirthDateIfUndefined(int year)

Updates the attribute with the specified value only if the attribute value is undefined.

UserProfileUpdate<? extends UserProfileUpdatePatcher> withBirthDateIfUndefined(int year, int month)

Updates the attribute with the specified value only if the attribute value is undefined.

UserProfileUpdate<? extends UserProfileUpdatePatcher> withBirthDateIfUndefined(int year, int month, int dayOfMonth)

Updates the attribute with the specified value only if the attribute value is undefined.

UserProfileUpdate<? extends UserProfileUpdatePatcher> withValueReset()

Resets the attribute value.

Method descriptions

withAge

public UserProfileUpdate<? extends UserProfileUpdatePatcher> withAge(int age)

Updates the attribute value.

Parameters:
age Age.

Returns:

The instance of the UserProfileUpdate class that contains all attribute updates.

withAgeIfUndefined

public UserProfileUpdate<? extends UserProfileUpdatePatcher> withAgeIfUndefined(int age)

Updates the attribute with the specified value only if the attribute value is undefined.

Parameters:
age Age.

Returns:

The instance of the UserProfileUpdate class that contains all attribute updates.

withBirthDate

public UserProfileUpdate<? extends UserProfileUpdatePatcher> withBirthDate(@NonNull Calendar date)

Updates the attribute value.

Parameters:
date The instance of the Calendar class.

Returns:

The instance of the UserProfileUpdate class that contains all attribute updates.

withBirthDate

public UserProfileUpdate<? extends UserProfileUpdatePatcher> withBirthDate(int year)

Updates the attribute value.

Parameters:
year Year of birth.

Returns:

The instance of the UserProfileUpdate class that contains all attribute updates.

withBirthDate

public UserProfileUpdate<? extends UserProfileUpdatePatcher> withBirthDate(int year, int month)

Updates the attribute value.

Parameters:
year Year of birth.
month Month of birth.

Returns:

The instance of the UserProfileUpdate class that contains all attribute updates.

withBirthDate

public UserProfileUpdate<? extends UserProfileUpdatePatcher> withBirthDate(int year, int month, int dayOfMonth)

Updates the attribute value.

Parameters:
year Year of birth.
month Month of birth.
dayOfMonth Day of birth.

Returns:

The instance of the UserProfileUpdate class that contains all attribute updates.

withBirthDateIfUndefined

public UserProfileUpdate<? extends UserProfileUpdatePatcher> withBirthDateIfUndefined(@NonNull Calendar date)

Updates the attribute with the specified value only if the attribute value is undefined.

Parameters:
date The instance of the Calendar class.

Returns:

The instance of the UserProfileUpdate class that contains all attribute updates.

withBirthDateIfUndefined

public UserProfileUpdate<? extends UserProfileUpdatePatcher> withBirthDateIfUndefined(int year)

Updates the attribute with the specified value only if the attribute value is undefined.

Parameters:
year Year of birth.

Returns:

The instance of the UserProfileUpdate class that contains all attribute updates.

withBirthDateIfUndefined

public UserProfileUpdate<? extends UserProfileUpdatePatcher> withBirthDateIfUndefined(int year, int month)

Updates the attribute with the specified value only if the attribute value is undefined.

Parameters:
year Year of birth.
month Month of birth.

Returns:

The instance of the UserProfileUpdate class that contains all attribute updates.

withBirthDateIfUndefined

public UserProfileUpdate<? extends UserProfileUpdatePatcher> withBirthDateIfUndefined(int year, int month, int dayOfMonth)

Updates the attribute with the specified value only if the attribute value is undefined.

Parameters:
year Year of birth.
month Month of birth.
dayOfMonth Day of birth.

Returns:

The instance of the UserProfileUpdate class that contains all attribute updates.

withValueReset

public UserProfileUpdate<? extends UserProfileUpdatePatcher> withValueReset()

Resets the attribute value.

Returns:

The instance of the UserProfileUpdate class that contains all attribute updates.