Base interface for classes that represent a read-only collection of elements.
interface
|
IBagConst
|
with
|
<T>
|
||
extends
|
IEnumerable<T>
|
||||
base of
|
BagConstBase
|
||||
IBag
|
|||||
IMapConst
|
|||||
ISortedSetConst
|
|||||
IVectorConst
|
Subclasses are free to implement set semantics, i.e. equal elements are stored only once.
The number of elements in this collection.
property
|
Count
{
get
}
|
||
type
|
int32
|
||
value
|
|
The number of elements. |
Returns if this collection contains the given element.
[Pure]
|
||||
method
|
Contains
(T element)
|
|||
type
|
bool
|
|||
params
|
element
|
The element. | ||
returns
|
true
if
element
is
contained
in
this
collection,
false
if
not.
|
Returns if this collection contains all given elements.
method
|
ContainsAll
(IEnumerable<T> elements)
|
||
type
|
bool
|
||
params
|
elements
|
[not-null]
|
The elements. |
returns
|
true
if
all
elements
are
contained
in
this
collection,
false
if
not.
|
Returns the first enumerated value.
[Pure]
|
||||
method
|
First
()
|
|||
type
|
T
|
|||
returns
|
The first enumerated value. |
Exceptions:
method
|
GetEnumerator
()
|
||
type
|
IEnumerator<T>
|
||
inherited
|
IEnumerable.GetEnumerator
|
Returns the last enumerated value.
[Pure]
|
||||
method
|
Last
()
|
|||
type
|
T
|
|||
returns
|
The last enumerated value. |
Exceptions:
Returns the elements of this enumerable object as a fresh array.
[Pure]
|
||||
method
|
ToArray
()
|
|||
type
|
T[]
|
|||
returns
|
|
The array of elements. |
Returns the elements of this collection as an array.
method
|
ToArrayCopy
(T[] array,
int32 offset = 0)
|
||
type
|
T[]
|
||
params
|
array
|
[not-null]
|
The output array. |
offset
|
[>=0]
|
Offset
into
array.
Defaults
to
0 .
|
|
returns
|
|
The filled array. |
Remarks:
The elements in this collection will be copied into the given array, starting at the array index specified by offset.
Returns the elements of this enumerable object as a list.
[Pure]
|
||||
method
|
ToArrayList
()
|
|||
type
|
IArrayVector<T>
|
|||
returns
|
|
The list of elements. |
Returns the elements of this enumerable object as a list.
[Pure]
|
||||
method
|
ToList
()
|
|||
type
|
IVectorConst<T>
|
|||
returns
|
|
The list of elements. |