TypedCollection

digraph InheritanceGraph { graph [bgcolor=transparent, color=lightsteelblue2, fontname=Arial, fontsize=10, outputorder=edgesfirst, overlap=prism, penwidth=2, rankdir=LR, splines=spline, style="dashed, rounded", truecolor=true ]; node [colorscheme=pastel19, fontname=Arial, fontsize=10, height=0, penwidth=2, shape=box, style="filled, rounded", width=0 ]; edge [color=lightslategrey, penwidth=1 ]; subgraph "cluster_abjad.core" { graph [label="abjad.core"]; node [color=1]; "abjad.core.NoteHeadList.NoteHeadList" [URL="../api/abjad/utilities/../core/NoteHeadList.html#abjad.core.NoteHeadList.NoteHeadList", color=1, label="Note\nHead\nList", target=_top]; } subgraph "cluster_abjad.markups" { graph [label="abjad.markups"]; node [color=2]; "abjad.markups.MarkupList" [URL="../api/abjad/utilities/../markups.html#abjad.markups.MarkupList", color=2, label="Markup\nList", target=_top]; } subgraph "cluster_abjad.meter" { graph [label="abjad.meter"]; node [color=3]; "abjad.meter.MeterList" [URL="../api/abjad/utilities/../meter.html#abjad.meter.MeterList", color=3, label="Meter\nList", target=_top]; "abjad.meter.OffsetCounter" [URL="../api/abjad/utilities/../meter.html#abjad.meter.OffsetCounter", color=3, label="Offset\nCounter", target=_top]; } subgraph cluster_builtins { graph [label=builtins]; node [color=8]; "builtins.object" [URL="https://docs.python.org/3.6/library/functions.html#object", color=8, label=object, target=_top]; } subgraph "cluster_abjad.pitch" { graph [label="abjad.pitch"]; node [color=4]; "abjad.pitch.IntervalClassSegment.IntervalClassSegment" [URL="../api/abjad/utilities/../pitch/IntervalClassSegment.html#abjad.pitch.IntervalClassSegment.IntervalClassSegment", color=4, label="Interval\nClass\nSegment", target=_top]; "abjad.pitch.IntervalClassSet.IntervalClassSet" [URL="../api/abjad/utilities/../pitch/IntervalClassSet.html#abjad.pitch.IntervalClassSet.IntervalClassSet", color=4, label="Interval\nClass\nSet", target=_top]; "abjad.pitch.IntervalClassVector.IntervalClassVector" [URL="../api/abjad/utilities/../pitch/IntervalClassVector.html#abjad.pitch.IntervalClassVector.IntervalClassVector", color=4, label="Interval\nClass\nVector", target=_top]; "abjad.pitch.IntervalSegment.IntervalSegment" [URL="../api/abjad/utilities/../pitch/IntervalSegment.html#abjad.pitch.IntervalSegment.IntervalSegment", color=4, label="Interval\nSegment", target=_top]; "abjad.pitch.IntervalSet.IntervalSet" [URL="../api/abjad/utilities/../pitch/IntervalSet.html#abjad.pitch.IntervalSet.IntervalSet", color=4, label="Interval\nSet", target=_top]; "abjad.pitch.IntervalVector.IntervalVector" [URL="../api/abjad/utilities/../pitch/IntervalVector.html#abjad.pitch.IntervalVector.IntervalVector", color=4, label="Interval\nVector", target=_top]; "abjad.pitch.PitchClassSegment.PitchClassSegment" [URL="../api/abjad/utilities/../pitch/PitchClassSegment.html#abjad.pitch.PitchClassSegment.PitchClassSegment", color=4, label="Pitch\nClass\nSegment", target=_top]; "abjad.pitch.TwelveToneRow.TwelveToneRow" [URL="../api/abjad/utilities/../pitch/TwelveToneRow.html#abjad.pitch.TwelveToneRow.TwelveToneRow", color=4, label="Twelve\nTone\nRow", target=_top]; "abjad.pitch.PitchClassSegment.PitchClassSegment" -> "abjad.pitch.TwelveToneRow.TwelveToneRow" [minlen=1]; "abjad.pitch.PitchClassSet.PitchClassSet" [URL="../api/abjad/utilities/../pitch/PitchClassSet.html#abjad.pitch.PitchClassSet.PitchClassSet", color=4, label="Pitch\nClass\nSet", target=_top]; "abjad.pitch.PitchClassVector.PitchClassVector" [URL="../api/abjad/utilities/../pitch/PitchClassVector.html#abjad.pitch.PitchClassVector.PitchClassVector", color=4, label="Pitch\nClass\nVector", target=_top]; "abjad.pitch.PitchSegment.PitchSegment" [URL="../api/abjad/utilities/../pitch/PitchSegment.html#abjad.pitch.PitchSegment.PitchSegment", color=4, label="Pitch\nSegment", target=_top]; "abjad.pitch.PitchSet.PitchSet" [URL="../api/abjad/utilities/../pitch/PitchSet.html#abjad.pitch.PitchSet.PitchSet", color=4, label="Pitch\nSet", target=_top]; "abjad.pitch.PitchVector.PitchVector" [URL="../api/abjad/utilities/../pitch/PitchVector.html#abjad.pitch.PitchVector.PitchVector", color=4, label="Pitch\nVector", target=_top]; "abjad.pitch.Segment.Segment" [URL="../api/abjad/utilities/../pitch/Segment.html#abjad.pitch.Segment.Segment", color=4, label=Segment, shape=oval, style=bold, target=_top]; "abjad.pitch.Segment.Segment" -> "abjad.pitch.IntervalClassSegment.IntervalClassSegment" [minlen=1]; "abjad.pitch.Segment.Segment" -> "abjad.pitch.IntervalSegment.IntervalSegment" [minlen=2]; "abjad.pitch.Segment.Segment" -> "abjad.pitch.PitchClassSegment.PitchClassSegment" [minlen=1]; "abjad.pitch.Segment.Segment" -> "abjad.pitch.PitchSegment.PitchSegment" [minlen=2]; "abjad.pitch.Set.Set" [URL="../api/abjad/utilities/../pitch/Set.html#abjad.pitch.Set.Set", color=4, label=Set, shape=oval, style=bold, target=_top]; "abjad.pitch.Set.Set" -> "abjad.pitch.IntervalClassSet.IntervalClassSet" [minlen=1]; "abjad.pitch.Set.Set" -> "abjad.pitch.IntervalSet.IntervalSet" [minlen=2]; "abjad.pitch.Set.Set" -> "abjad.pitch.PitchClassSet.PitchClassSet" [minlen=1]; "abjad.pitch.Set.Set" -> "abjad.pitch.PitchSet.PitchSet" [minlen=2]; "abjad.pitch.Vector.Vector" [URL="../api/abjad/utilities/../pitch/Vector.html#abjad.pitch.Vector.Vector", color=4, label=Vector, shape=oval, style=bold, target=_top]; "abjad.pitch.Vector.Vector" -> "abjad.pitch.IntervalClassVector.IntervalClassVector" [minlen=1]; "abjad.pitch.Vector.Vector" -> "abjad.pitch.IntervalVector.IntervalVector" [minlen=2]; "abjad.pitch.Vector.Vector" -> "abjad.pitch.PitchClassVector.PitchClassVector" [minlen=1]; "abjad.pitch.Vector.Vector" -> "abjad.pitch.PitchVector.PitchVector" [minlen=2]; } subgraph "cluster_abjad.system" { graph [label="abjad.system"]; node [color=5]; "abjad.system.AbjadObject.AbjadObject" [URL="../api/abjad/utilities/../system/AbjadObject.html#abjad.system.AbjadObject.AbjadObject", color=5, label="Abjad\nObject", target=_top]; } subgraph "cluster_abjad.timespans" { graph [label="abjad.timespans"]; node [color=6]; "abjad.timespans.CompoundInequality.CompoundInequality" [URL="../api/abjad/utilities/../timespans/CompoundInequality.html#abjad.timespans.CompoundInequality.CompoundInequality", color=6, label="Compound\nInequality", target=_top]; "abjad.timespans.TimespanList.TimespanList" [URL="../api/abjad/utilities/../timespans/TimespanList.html#abjad.timespans.TimespanList.TimespanList", color=6, label="Timespan\nList", target=_top]; } subgraph "cluster_abjad.utilities" { graph [label="abjad.utilities"]; node [color=7]; "abjad.utilities.OrderedDict.OrderedDict" [URL="../api/abjad/utilities/OrderedDict.html#abjad.utilities.OrderedDict.OrderedDict", color=7, label="Ordered\nDict", target=_top]; "abjad.utilities.PatternTuple.PatternTuple" [URL="../api/abjad/utilities/PatternTuple.html#abjad.utilities.PatternTuple.PatternTuple", color=7, label="Pattern\nTuple", target=_top]; "abjad.utilities.TypedCollection.TypedCollection" [URL="../api/abjad/utilities/TypedCollection.html#abjad.utilities.TypedCollection.TypedCollection", color=black, fontcolor=white, label="Typed\nCollection", shape=oval, style="bold, filled", target=_top]; "abjad.utilities.TypedCollection.TypedCollection" -> "abjad.utilities.OrderedDict.OrderedDict" [minlen=1]; "abjad.utilities.TypedCounter.TypedCounter" [URL="../api/abjad/utilities/TypedCounter.html#abjad.utilities.TypedCounter.TypedCounter", color=7, label="Typed\nCounter", target=_top]; "abjad.utilities.TypedCollection.TypedCollection" -> "abjad.utilities.TypedCounter.TypedCounter"; "abjad.utilities.TypedFrozenset.TypedFrozenset" [URL="../api/abjad/utilities/TypedFrozenset.html#abjad.utilities.TypedFrozenset.TypedFrozenset", color=7, label="Typed\nFrozenset", target=_top]; "abjad.utilities.TypedCollection.TypedCollection" -> "abjad.utilities.TypedFrozenset.TypedFrozenset" [minlen=2]; "abjad.utilities.TypedList.TypedList" [URL="../api/abjad/utilities/TypedList.html#abjad.utilities.TypedList.TypedList", color=7, label="Typed\nList", target=_top]; "abjad.utilities.TypedCollection.TypedCollection" -> "abjad.utilities.TypedList.TypedList"; "abjad.utilities.TypedTuple.TypedTuple" [URL="../api/abjad/utilities/TypedTuple.html#abjad.utilities.TypedTuple.TypedTuple", color=7, label="Typed\nTuple", target=_top]; "abjad.utilities.TypedCollection.TypedCollection" -> "abjad.utilities.TypedTuple.TypedTuple"; "abjad.utilities.TypedTuple.TypedTuple" -> "abjad.utilities.PatternTuple.PatternTuple" [minlen=1]; } "abjad.system.AbjadObject.AbjadObject" -> "abjad.utilities.TypedCollection.TypedCollection"; "abjad.utilities.TypedCounter.TypedCounter" -> "abjad.meter.OffsetCounter" [minlen=1]; "abjad.utilities.TypedCounter.TypedCounter" -> "abjad.pitch.Vector.Vector"; "abjad.utilities.TypedFrozenset.TypedFrozenset" -> "abjad.pitch.Set.Set"; "abjad.utilities.TypedList.TypedList" -> "abjad.core.NoteHeadList.NoteHeadList" [minlen=1]; "abjad.utilities.TypedList.TypedList" -> "abjad.markups.MarkupList" [minlen=2]; "abjad.utilities.TypedList.TypedList" -> "abjad.meter.MeterList" [minlen=1]; "abjad.utilities.TypedList.TypedList" -> "abjad.timespans.CompoundInequality.CompoundInequality" [minlen=2]; "abjad.utilities.TypedList.TypedList" -> "abjad.timespans.TimespanList.TimespanList" [minlen=1]; "abjad.utilities.TypedTuple.TypedTuple" -> "abjad.pitch.Segment.Segment"; "builtins.object" -> "abjad.system.AbjadObject.AbjadObject" [minlen=1]; }

abstract class abjad.utilities.TypedCollection.TypedCollection(items=None, item_class=None)

Abstract typed collection.


Attributes Summary

__contains__ Is true when typed collection contains item.
__eq__ Is true when argument is a typed collection with items that compare equal to those of this typed collection.
__hash__ Hashes typed collection.
__iter__ Iterates typed collection.
__len__ Gets length of typed collection.
item_class Gets item class of collection.
items Gets items in collection.

Special methods

__contains__(item)

Is true when typed collection contains item.

Returns true or false.

__eq__(argument)

Is true when argument is a typed collection with items that compare equal to those of this typed collection.

Returns true or false.

(AbjadObject).__format__(format_specification='')

Formats Abjad object.

Set format_specification to '' or 'storage'. Interprets '' equal to 'storage'.

Returns string.

__hash__()

Hashes typed collection.

Redefined in tandem with __eq__.

__iter__()

Iterates typed collection.

Returns generator.

__len__()

Gets length of typed collection.

Returns nonnegative integer.

(AbjadObject).__repr__()

Gets interpreter representation of Abjad object.

Returns string.


Read-only properties

item_class

Gets item class of collection.

Collection coerces items according to item_class.

Returns class.

items

Gets items in collection.

Returns list.