Google is committed to advancing racial equity for Black communities. See how.

TransferPreferencesBuilder

public class TransferPreferencesBuilder extends Object

Builder of immutable TransferPreferences instances.

Field Summary

public static final TransferPreferences DEFAULT_PREFERENCES The default value for {$link TransferPreferences}: unrestricted transfer for all condition.

Public Constructor Summary

TransferPreferencesBuilder()
Constructs a builder with DEFAULT_PREFERENCES values.
TransferPreferencesBuilder(TransferPreferences transferPreferences)
Constructs a builder with given transfer preferences values.

Public Method Summary

TransferPreferences
build()
Builds an instance of TransferPreferences based on the values set in this builder.
TransferPreferencesBuilder
setBatteryUsagePreference(int batteryUsagePreference)
Updates the value of battery usage preference in the builder.
TransferPreferencesBuilder
setIsRoamingAllowed(boolean isRoamingAllowed)
Updates the value of roaming preference in the builder.
TransferPreferencesBuilder
setNetworkPreference(int networkPreference)
Updates the value of network preference in the builder.

Inherited Method Summary

Fields

public static final TransferPreferences DEFAULT_PREFERENCES

The default value for {$link TransferPreferences}: unrestricted transfer for all condition.

Public Constructors

public TransferPreferencesBuilder ()

Constructs a builder with DEFAULT_PREFERENCES values.

public TransferPreferencesBuilder (TransferPreferences transferPreferences)

Constructs a builder with given transfer preferences values.

Public Methods

public TransferPreferences build ()

Builds an instance of TransferPreferences based on the values set in this builder.

public TransferPreferencesBuilder setBatteryUsagePreference (int batteryUsagePreference)

Updates the value of battery usage preference in the builder.

public TransferPreferencesBuilder setIsRoamingAllowed (boolean isRoamingAllowed)

Updates the value of roaming preference in the builder.

public TransferPreferencesBuilder setNetworkPreference (int networkPreference)

Updates the value of network preference in the builder.