<<Type>> Sequence {Analysis} derived from: Collection

Documentation
A sequence is a type of set where the elements have been assigned offsets (a integral ordering). If the same element is assigned multiple offsets, then the sequence "revisits" the element for each assigned offset. Logically, we can think of a sequence as a set of pairs <element :T, offset : Integer>. Since both element and offset must be equal for the ordered pair to be equal, there is no violation of the set semantics. Not all numbered slots in a sequence must be occupied, and no offset may be occupied that exceeds the "length."

{offset > length implies element.isNull}


Parent PackageCollectionsAbstractYes
Export ControlPublicAccessLink Class forNone
Class KindParameterizedClassCardinalityn
Space ConcurrencySequential
PersistenceYes  


Operations
NameSignatureClass
firstRecord<T, Integer = 1> first ()Sequence
lastRecord<T, Integer = length> last ()Sequence
tailSequence<T> tail ()Sequence
atT at (Integer position)Sequence
prependSequence<T> prepend (T element)Sequence
deleteFirstSequence<T> deleteFirst ()Sequence
deleteAtSequence<T> deleteAt (Integer position)Sequence
deleteLastSequence<T> deleteLast ()Sequence
asSetSet<T> asSet ()Sequence
subSequenceSequence<T> subSequence (Integer begin, Integer end)Sequence
concatenateSequence<T> concatenate (Sequence<T> tail)Sequence
collectSequence<expr.type> collect (OCL expr)Sequence
reverseSequence<T> reverse ()Sequence
appendSequence<T> append (T element)Sequence


Attributes
NameClassTypeInitial Value
lengthSequenceInteger 


Associations
NameMy RoleMy ClassOther RoleOther Element
--Not Named----Not Named--SequenceelementT


Generalization Relationships
NameClassSupplier
--Not Named--SequenceCollection


Realize Relationships
NameClassSupplier
--Not Named--CollectionTransfiniteSet