text_lint.sequencers.bases.sequencer_base.SequencerBase
- class text_lint.sequencers.bases.sequencer_base.SequencerBase(entities: List[TypeSequencerEntity])[Quellcode]
Bases:
ABC,Generic[TypeSequencerEntity]A base class for iterating over discrete entities.
- __init__(entities: List[TypeSequencerEntity]) None[Quellcode]
Initialize OperatorBase instances.
- Parameter:
entities (List[TypeSequencerEntity]) – The objects this sequencer iterates over.
- __iter__() Iterator[TypeSequencerEntity][Quellcode]
Implement the iter operation for SequencerBase instances.
- Rückgabe:
The sequencer instance itself.
- Rückgabetyp:
Iterator[TypeSequencerEntity]
- __len__() int[Quellcode]
Implement the len operator for SequencerBase instances.
- Rückgabe:
The number of entities in this instance.
- Rückgabetyp:
int
- abstract __next__() TypeSequencerEntity[Quellcode]
Implement the next operation for SequencerBase instances.
- Rückgabe:
The next entity in the sequencer.
- Rückgabetyp:
TypeSequencerEntity
- property current: TypeSequencerEntity
Current entity the sequencer is pointing to.
- property last: TypeSequencerEntity
Last entity in the sequencer.
- next() None[Quellcode]
Advance the sequencer to the next entity.