KeysAndValues.Builder

public static class KeysAndValues.Builder extends Object

Builder class for KeysAndValues using which values will be assigned to private variables.

Public Constructor Summary

Public Method Summary

KeysAndValues
build()
Creates an instance of KeysAndValues with the values assigned through builder.
KeysAndValues.Builder
put(String key, double value)
Adds a context data with double value.
KeysAndValues.Builder
put(String key, long value)
Adds a context data with long value.
KeysAndValues.Builder
put(String key, String value)
Adds a context data with string value.
KeysAndValues.Builder
put(String key, boolean value)
Adds a context data with boolean value.

Inherited Method Summary

Public Constructors

public Builder ()

Public Methods

public KeysAndValues build ()

Creates an instance of KeysAndValues with the values assigned through builder.

Returns
  • instance of KeysAndValues

public KeysAndValues.Builder put (String key, double value)

Adds a context data with double value.

Parameters
key Identifies the value in context.
value Value assigned to the context.
Returns
  • Reference to class itself so that more data can be added.

public KeysAndValues.Builder put (String key, long value)

Adds a context data with long value.

Parameters
key Identifies the value in context.
value Value assigned to the context.
Returns
  • Reference to class itself so that more data can be added.

public KeysAndValues.Builder put (String key, String value)

Adds a context data with string value.

Parameters
key Identifies the value in context.
value Value assigned to the context.
Returns
  • Reference to class itself so that more data can be added.

public KeysAndValues.Builder put (String key, boolean value)

Adds a context data with boolean value.

Parameters
key Identifies the value in context.
value Value assigned to the context.
Returns
  • Reference to class itself so that more data can be added.