Class Triggers


  • public class Triggers
    extends java.lang.Object
    Contains helper static methods related to TimedTrackingTrigger.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.List<com.brightcove.ssai.tracking.timed.TimedTrackingTrigger> create​(EventEmitter eventEmitter)
      Crates the TimedTrackingTriggers of the supported TrackingEvents.
      static void emitTrackingEvents​(EventEmitter eventEmitter, java.util.List<TrackingEvent> trackingEvents, TrackingType trackingType)
      Helper method to emit each TrackingEvent from a list.
      static boolean isValueInBetween​(long value, long min, long max)
      Checks whether a value is in between the min and the max.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • create

        public static java.util.List<com.brightcove.ssai.tracking.timed.TimedTrackingTrigger> create​(@NonNull
                                                                                                     EventEmitter eventEmitter)
        Crates the TimedTrackingTriggers of the supported TrackingEvents.
        Returns:
        A List of the TimedTrackingTriggers
      • isValueInBetween

        public static boolean isValueInBetween​(long value,
                                               long min,
                                               long max)
        Checks whether a value is in between the min and the max. The min value is inclusive and the max value is exclusive, in fewer words [min, max).
        Parameters:
        value - the value to check.
        min - the minimum value.
        max - the maximum value.
        Returns:
        true if value is in between [min, max), false otherwise.
      • emitTrackingEvents

        public static void emitTrackingEvents​(@NonNull
                                              EventEmitter eventEmitter,
                                              @NonNull
                                              java.util.List<TrackingEvent> trackingEvents,
                                              @NonNull
                                              TrackingType trackingType)
        Helper method to emit each TrackingEvent from a list.
        Parameters:
        eventEmitter - EventEmitter used to mit the TrackingEvents.
        trackingEvents - TrackingEvents to be emitted.