# Class AnalyticsEvent.Builder

java.lang.Object
com.codename1.analytics.AnalyticsEvent.Builder

Enclosing class:
  `AnalyticsEvent`

public static final class AnalyticsEvent.Builder extends Object
Mutable builder for `AnalyticsEvent`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `AnalyticsEvent`
  `build()`
  Builds the immutable event.
  `AnalyticsEvent.Builder`
  `category(String category)`
  Sets the event category.
  `AnalyticsEvent.Builder`
  `param(String key, Object value)`
  Adds or replaces a parameter.
  `AnalyticsEvent.Builder`
  `timestamp(long timestamp)`
  Overrides the default client timestamp.

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### category

    public AnalyticsEvent.Builder category(String category)

    Sets the event category.

    ###### Parameters

    - `category`: the category

    ###### Returns

    this builder

  - ### param

    public AnalyticsEvent.Builder param(String key, Object value)

    Adds or replaces a parameter.

    ###### Parameters

    - `key`: the parameter name

    - `value`: the parameter value (String, Number or Boolean)

    ###### Returns

    this builder

  - ### timestamp

    public AnalyticsEvent.Builder timestamp(long timestamp)

    Overrides the default client timestamp.

    ###### Parameters

    - `timestamp`: milliseconds since the epoch

    ###### Returns

    this builder

  - ### build

    public AnalyticsEvent build()

    Builds the immutable event.

    ###### Returns

    a new `AnalyticsEvent`