Packagecom.adobe.mediacore.utils
Classpublic final class TimeRange
InheritanceTimeRange Inheritance Object



Public Properties
 PropertyDefined By
  begin : Number
[read-only] Returns the begin time for the time range.
TimeRange
  duration : Number
[read-only] Returns the duration of the time range.
TimeRange
  end : Number
[read-only] Returns the end time of the time range.
TimeRange
Public Methods
 MethodDefined By
  
TimeRange(begin:Number, end:Number)
Default constructor.
TimeRange
  
contains(position:Number):Boolean
Returns whether the provided position is contained inside the time range.
TimeRange
  
createRange(begin:Number, duration:Number):TimeRange
[static] Creates a new time range with the specified values as limits.
TimeRange
  
intersects(range:TimeRange):Boolean
Returns whether the provided time range intersects with the current time range.
TimeRange
  
toString():String
Returns a String representation of the current time range.
TimeRange
Property Detail
beginproperty
begin:Number  [read-only]

Returns the begin time for the time range.


Implementation
    public function get begin():Number
durationproperty 
duration:Number  [read-only]

Returns the duration of the time range.


Implementation
    public function get duration():Number
endproperty 
end:Number  [read-only]

Returns the end time of the time range.


Implementation
    public function get end():Number
Constructor Detail
TimeRange()Constructor
public function TimeRange(begin:Number, end:Number)

Default constructor.

Parameters
begin:Number
 
end:Number
Method Detail
contains()method
public function contains(position:Number):Boolean

Returns whether the provided position is contained inside the time range.

Parameters

position:Number — the time position to be checked

Returns
Boolean — true is the position is inside the range, false otherwise.
createRange()method 
public static function createRange(begin:Number, duration:Number):TimeRange

Creates a new time range with the specified values as limits.

Parameters

begin:Number — The begin time.
 
duration:Number — The end time.

Returns
TimeRange
intersects()method 
public function intersects(range:TimeRange):Boolean

Returns whether the provided time range intersects with the current time range.

Parameters

range:TimeRange — The time range to be checked

Returns
Boolean — true is their intersection is not empty, false otherwise.
toString()method 
public function toString():String

Returns a String representation of the current time range.

Returns
String — a string containing the beginning and the end of the time range.