Interface Variation.OnState

Enclosing interface:
Variation

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

    • getState

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

      Variation getVariation()
      The containing variation.
      Returns:
      An object of type Variation. Cannot be null.
      Since:
      0.5
    • getDefinedExperiences

      Set<Variation.Experience> getDefinedExperiences()
      The set of this variation'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(Variation.Experience properExp, Variation.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 variations must be instrumented on this state, and b) no two experiences are from the same variation.
      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