TimeRangeCollection公用程式類別會擷取TimeRange規格的有序集合概念,並提供將自身轉譯為Metadata執行個體的服務。
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 toMetadata(Metadata options) {...}
}
此 type
引數,是建構函式方法的簽章中的第一個位置引數,是 TimeRangeCollection#Type
分項清單。 這是 TimeRangeCollection
類別。 此列舉目前定義的值為 MARK_RANGES
, DELETE_RANGES
、和 REPLACE_RANGES
. 您可以建立 TimeRangeCollection
物件。