IntervalItem

class glotaran.model.interval_item.IntervalItem(*, interval: tuple[float, float] | list[tuple[float, float]] | None = None)[source]

Bases: Item

An item with an interval.

Method generated by attrs for class IntervalItem.

Attributes Summary

interval

Methods Summary

applies

Check if the index is in the intervals.

has_interval

Check if intervals are defined.

Methods Documentation

applies(index: float | None) bool[source]

Check if the index is in the intervals.

Parameters:

index (float) – The index.

Return type:

bool

has_interval() bool[source]

Check if intervals are defined.

Return type:

bool

interval: tuple[float, float] | list[tuple[float, float]] | None