CustomSignals.Builder

public class CustomSignals.Builder


Builder for constructing CustomSignals instances.

Summary

Public constructors

Public methods

@NonNull CustomSignals

Creates a CustomSignals instance with the added custom signals.

@NonNull CustomSignals.Builder
put(@NonNull String key, @Nullable String value)

Adds a custom signal with a value that can be a string or null to the builder.

@NonNull CustomSignals.Builder
put(@NonNull String key, long value)

Adds a custom signal with a long value to the builder.

@NonNull CustomSignals.Builder
put(@NonNull String key, double value)

Adds a custom signal with a double value to the builder.

Public constructors

Builder

public Builder()

Public methods

build

public @NonNull CustomSignals build()

Creates a CustomSignals instance with the added custom signals.

Returns
@NonNull CustomSignals

The constructed CustomSignals instance.

put

public @NonNull CustomSignals.Builder put(@NonNull String key, @Nullable String value)

Adds a custom signal with a value that can be a string or null to the builder.

Parameters
@NonNull String key

The key for the custom signal.

@Nullable String value

The string value associated with the key. Can be null.

Returns
@NonNull CustomSignals.Builder

This Builder instance to allow chaining of method calls.

put

public @NonNull CustomSignals.Builder put(@NonNull String key, long value)

Adds a custom signal with a long value to the builder.

Parameters
@NonNull String key

The key for the custom signal.

long value

The long value for the custom signal.

Returns
@NonNull CustomSignals.Builder

This Builder instance to allow chaining of method calls.

put

public @NonNull CustomSignals.Builder put(@NonNull String key, double value)

Adds a custom signal with a double value to the builder.

Parameters
@NonNull String key

The key for the custom signal.

double value

The double value for the custom signal.

Returns
@NonNull CustomSignals.Builder

This Builder instance to allow chaining of method calls.