Package com.variant.share.schema
Interface Variation
public interface Variation
Representation of the
/variations
list element.- Since:
- 0.5
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
Representation of the/variations[]/experience
key.static interface
Representation of the/variations[]/onStates[]
array element. -
Method Summary
Modifier and TypeMethodDescriptionThe variations declared as concurrent with this variation, as provided by the/variations[]/concurrentVariations
key.Get this variation's control experience.The durability settings of this variation, as provided by the/variations[]/durability
key.getExperience
(String name) Get an experience by its name.This variation's experiences, as provided by the/variations[]/experiences
element.getHooks()
List of variation-scoped lifecycle hooks, as provided by the/variations[]/hooks
key.getName()
This variation's name, as provided by the/variations[]/name
element.getOnState
(State state) This variation's instrumentation details on a given state, as provided by an element of the/variations[]/onStates
sequence key.List of this variation's state instrumentations, as provided by the/variations[]/onStates
key.Variation parameters defined by this variation.The containing variation schema.boolean
isConcurrentWith
(Variation other) Is this variation concurrent with a given variation.boolean
isInstruments
(State state) Does this variation instrument a given state?boolean
isOn()
Is this variation currently online, as provided by the/variations[]/isOn
key.boolean
isSerialWith
(Variation other) Is this variation serial with a given variation.
-
Method Details
-
getSchema
Schema getSchema()The containing variation schema.- Since:
- 0.6
-
getName
String getName()This variation's name, as provided by the/variations[]/name
element.- Since:
- 0.5
-
getExperiences
List<Variation.Experience> getExperiences()This variation's experiences, as provided by the/variations[]/experiences
element.- Returns:
- An immutable list of
Variation.Experience
objects in ordinal order. - Since:
- 0.5
-
getExperience
Get an experience by its name.- Returns:
- An
Optional
, containing the experience with the given name, or empty if no such experience in this variation. - Since:
- 0.5
-
getControlExperience
Variation.Experience getControlExperience()Get this variation's control experience.- Returns:
- An
Variation.Experience
object. Cannot be null. - Since:
- 0.5
-
isOn
boolean isOn()Is this variation currently online, as provided by the/variations[]/isOn
key. All sessions are implicitly disqualified for an offline variation, as if it did not exist at all. None of this variation's experiences will appear in the list of a session's live experiences.- Returns:
- true if the test is online, false if not.
- Since:
- 0.5
-
getHooks
List<VariationHook> getHooks()List of variation-scoped lifecycle hooks, as provided by the/variations[]/hooks
key.- Returns:
- An immutable list of
VariationHook
objects in ordinal order. - Since:
- 0.7
-
getOnStates
List<Variation.OnState> getOnStates()List of this variation's state instrumentations, as provided by the/variations[]/onStates
key.- Returns:
- An immutable list of objects of type
Variation.OnState
. Cannot be null. - Since:
- 0.5
-
getConcurrentVariations
The variations declared as concurrent with this variation, as provided by the/variations[]/concurrentVariations
key.- Returns:
- An immutable list of concurrent variations in ordinal order.
- Since:
- 0.5
-
getDurability
Durability getDurability()The durability settings of this variation, as provided by the/variations[]/durability
key.- Since:
- 0.10
-
getParameters
Variation parameters defined by this variation.- Returns:
- An immutable map of variation parameters.
- Since:
- 1.0
-