Class IntervalTier
java.lang.Object
ca.phon.extensions.ExtendableObject
ca.phon.session.IntervalTier
- All Implemented Interfaces:
IExtendable
Collection of interval/points
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumInsertion strategy used when adding new intervals to the tier and an overlap occurs.static classInterval entity for timeline tierstatic classPoint entity for timeline tier -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddInterval(float start, float end, IntervalTier.InsertionStrategy insertionStrategy) Add new interval to tieraddInterval(float start, float end, String label, IntervalTier.InsertionStrategy insertionStrategy) Add new interval to tierbooleanaddInterval(IntervalTier.Interval interval, IntervalTier.InsertionStrategy insertionStrategy) Add new interval to tierGet list of intervals in tier (points included) as an unmodifiable listgetName()Get tier namebooleanremoveInterval(IntervalTier.Interval interval) Remove interval from tierMethods inherited from class ca.phon.extensions.ExtendableObject
getExtension, getExtensions, putExtension, removeExtension
-
Constructor Details
-
IntervalTier
Create a new timeline tier
-
-
Method Details
-
getName
-
getIntervals
Get list of intervals in tier (points included) as an unmodifiable list- Returns:
- list of all intervals and points in tier in order
-
addInterval
public IntervalTier.Interval addInterval(float start, float end, IntervalTier.InsertionStrategy insertionStrategy) Add new interval to tier- Parameters:
start-end-insertionStrategy-- Returns:
- new interval if created, null otherwise
- Throws:
IllegalArgumentException- if insertionStrategy is ERROR_ON_OVERLAPS and the given interval overlaps an existing interval in the tier
-
addInterval
public IntervalTier.Interval addInterval(float start, float end, String label, IntervalTier.InsertionStrategy insertionStrategy) Add new interval to tier- Parameters:
start-end-label-insertionStrategy-- Returns:
- new interval if created, null otherwise
- Throws:
IllegalArgumentException- if insertionStrategy is ERROR_ON_OVERLAPS and the given interval overlaps an existing interval in the tier
-
addInterval
public boolean addInterval(IntervalTier.Interval interval, IntervalTier.InsertionStrategy insertionStrategy) Add new interval to tier- Parameters:
interval-insertionStrategy-- Returns:
- boolean if interval was added, false otherwise
- Throws:
IllegalArgumentException- if insertionStrategy is ERROR_ON_OVERLAPS and the given interval overlaps an existing interval in the tier
-
removeInterval
Remove interval from tier- Parameters:
interval-
-