Class MediaSegment
java.lang.Object
ca.phon.extensions.ExtendableObject
ca.phon.session.MediaSegment
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Equals will return true if start/end times are the same.float
Return end time in secondsfloat
Get end valuelong
Return end time in millisecondsfloat
Return segment length in secondslong
Return segment length in millisecondsfloat
Return start time in secondsfloat
Get start value as a floating point numberlong
Return start time in millisecondsGet media unit represented by getStartValue() and getEndValue()boolean
isPoint()
Is the media segment a single pointboolean
Is the media segment a single point at the origin (0.0f)void
setEndTime
(float endTime) Set end time in secondsvoid
setEndTimeMs
(long endTime) Set end time in millisecondsvoid
setEndValue
(float end) Set end valuevoid
setSegment
(float startValue, float endValue) void
setSegment
(float startValue, float endValue, MediaUnit unit) void
setSegment
(MediaSegment seg) void
setStartTime
(float startTime) Set start time in secondsvoid
setStartTimeMs
(long startTime) Set start time in millisecondsvoid
setStartValue
(float start) Set start value, unit is specified by getUnitType()void
setUnitType
(MediaUnit mediaUnit) Set media unit for segmenttoString()
Methods inherited from class ca.phon.extensions.ExtendableObject
getExtension, getExtensions, putExtension, removeExtension
-
Method Details
-
getStartValue
public float getStartValue()Get start value as a floating point number- Returns:
- start value
-
setStartValue
public void setStartValue(float start) Set start value, unit is specified by getUnitType()- Parameters:
start
-
-
getEndValue
public float getEndValue()Get end value- Returns:
- end value
-
setEndValue
public void setEndValue(float end) Set end value- Parameters:
end
-
-
getUnitType
Get media unit represented by getStartValue() and getEndValue()- Returns:
- media unit
-
getStartTime
public float getStartTime()Return start time in seconds- Returns:
- start time in seconds
-
setStartTime
public void setStartTime(float startTime) Set start time in seconds- Parameters:
startTime
-
-
getStartValueMs
public long getStartValueMs()Return start time in milliseconds- Returns:
- start time in milliseconds
-
setStartTimeMs
public void setStartTimeMs(long startTime) Set start time in milliseconds- Parameters:
startTime
-
-
getEndTime
public float getEndTime()Return end time in seconds- Returns:
- end time in seconds
-
setEndTime
public void setEndTime(float endTime) Set end time in seconds- Parameters:
endTime
-
-
getEndValueMs
public long getEndValueMs()Return end time in milliseconds- Returns:
- end time in milliseconds
-
setEndTimeMs
public void setEndTimeMs(long endTime) Set end time in milliseconds- Parameters:
endTime
-
-
getLength
public float getLength()Return segment length in seconds- Returns:
- length in seconds
-
getLengthMs
public long getLengthMs()Return segment length in milliseconds- Returns:
- length in milliseconds
-
setUnitType
-
setSegment
public void setSegment(float startValue, float endValue) -
isPoint
public boolean isPoint()Is the media segment a single point- Returns:
- true if getStartValue() == getEndValue()
-
isPointAtOrigin
public boolean isPointAtOrigin()Is the media segment a single point at the origin (0.0f)- Returns:
- true if isPoint() == true invalid input: '&'invalid input: '&' getStartValue() == 0.0f
-
setSegment
-
setSegment
-
equals
-
toString
-