Interface Experiment.OnState

Enclosing interface:
Experiment

public static interface Experiment.OnState
Representation of the /experiments[]/onStates[] array element. Encapsulates data related to instrumentation of a particular experiment on a particular state.
Since:
0.5
  • Method Details

    • getState

      State getState()
      The state this instrumentation is for, as provided by the /experiments[]/onStates[]/stateRef element.
      Returns:
      An object of type State. Cannot be null.
      Since:
      0.5
    • getExperiment

      Experiment getExperiment()
      The containing experiment.
      Returns:
      An object of type Experiment. Cannot be null.
      Since:
      0.5
    • getDefinedExperiences

      Set<Experiment.Experience> getDefinedExperiences()
      The set of this experiment's experiences defined on this state. Those experiences not in this state are referred to as <phantom. The host application cannot target a session for a state that is phantom in any of its live experiences. See documentation for more on mixed instrumentation.
      Since:
      0.10
    • getVariants

      Set<StateVariant> getVariants()
      A set of state variants for this instrumentation. Includes explicitly defined state variants, as well as inferred ones.
      Returns:
      A set of objects of type StateVariant in no particular order. Cannot be null.
      Since:
      0.5
    • getVariant

      Optional<StateVariant> getVariant(Experiment.Experience properExp, Experiment.Experience... concurrentExps)
      The state variant corresponding to a set of experiences. At least one (the proper) experience must be specified. It is caller's responsibility to ensure that passed experience list is consistent, i.e. that a) all experiments must be instrumented on this state, and b) no two experiences are from the same experiment.
      Returns:
      The Optional, containing the StateVariant object, given by the set of experiences, if exists, or empty if no state variant corresponds to the given set of experiences.
      Since:
      0.9