TimeRangeCollection class

The TimeRangeCollection utility class abstracts the notion of an ordered collection of TimeRange specifications and provides services to translate itself into a Metadata instance.

public final class TimeRangeCollection {
   // default constructor method
   public TimeRangeCollection(Type type) {...}
   // the list of timerange specifications provided at construction time 
   public TimeRangeCollection(Type type, List<TimeRange> timeRanges) {...}
   // timerange specs can also be added later
   public void addTimeRange(TimeRange timeRange) {...}
   // translate the set of timerange specs into a Metadata instance 
   public Metadata toMedatada(Metadata options) {...}
}

The type parameter, which is the first positional parameter in the signature of the constructor methods, is an instance of the TimeRangeCollection#Type enumeration (part of the TimeRangeCollection class). The only value that is currently defined by this enumeration is CUSTOM_AD_MARKERS, which states that the TimeRangeCollection is a collection of time-rage specifications associated with custom ad markers.