| |||||
Previous Next |
A sequence is a collection where the elements are ordered. An element may be part of a sequence more than once.
Operation Summary | |
Boolean | =(Sequence rhs) True if this sequence contains the same elements as rhs in the same order. |
Boolean | <>(Sequence rhs) True if this sequence does not contain the same elements as rhs in the same order. |
Sequence | append(OclAny object) A sequence of elements, consisting of all elements of this sequence, followed by object. |
Bag | asBag A bag that contains all the elements from this sequence. |
Set | asSet A set that contains all the elements from this sequence, with duplicates removed. |
OclAny | at(Integer rank) The element number rank in the sequence. |
Sequence | collect(OclAny_Expression expr) The sequence of elements which results from applying the expr expression to every member of this set. |
Integer | count(OclAny object) The number of occurences of object in this sequence. |
Sequence | excluding(OclAny object) A sequence containing all elements of this sequence apart from all occurences of object. |
OclAny | first The first element of this sequence. |
Sequence | including(OclAny object) The sequence containing all elements of this sequence plus object added as the last element. |
OclAny | last The last element of this sequence. |
Sequence | prepend(OclAny object) A sequence consisting of object, followed by all elements in this sequence. |
Sequence | reject(Boolean_Expression expr) The sub-sequence of all elements for which applying the epr expression evaluates to false. |
Sequence | select(Boolean_Expression expr) The sub-sequence of all elements for which applying the expr expression evaluates to true. |
Sequence | subSequence(Integer from, Integer to) A sub-sequence of this sequence, starting at number from, up to and including element number to. |
Sequence | union(Sequence rhs) A sequence consisting of all elements of this sequence, followed by all elements in rhs. |
Operations inherited from type Collection |
excludes, excludesAll, exists, forAll, getOne, includes, includesAll, isEmpty, isUnique, notEmpty, size, sortedBy, sortedBy, sum |
Operations Detail |
public Integer count(OclAny object)
count
in type Collection
public Boolean =(Sequence rhs)
public Boolean <>(Sequence rhs)
public Sequence union(Sequence rhs)
public Sequence append(OclAny object)
public Sequence prepend(OclAny object)
public Sequence subSequence(Integer from, Integer to)
public OclAny at(Integer rank)
public OclAny first
public OclAny last
public Sequence including(OclAny object)
public Sequence excluding(OclAny object)
public Sequence select(Boolean_Expression expr)
public Sequence reject(Boolean_Expression expr)
public Sequence collect(OclAny_Expression expr)
public Bag asBag
public Set asSet
| |||||
Previous Next |