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:
ageAge.

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:
ageAge.

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:
dateThe 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:
yearYear 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:
yearYear of birth.
monthMonth 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:
yearYear of birth.
monthMonth of birth.
dayOfMonthDay 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:
dateThe 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:
yearYear 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:
yearYear of birth.
monthMonth 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:
yearYear of birth.
monthMonth of birth.
dayOfMonthDay 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.