IBagConst

Description

interface Tinman.Core.Collections.IBagConst<T>

Derived from

IEnumerable<T>

Extended by

BagConstBase abstract
IBag
IMapConst
ISortedSetConst
IVectorConst

Base interface for classes that represent a read-only collection of elements.

Subclasses are free to implement set semantics, i.e. equal elements are stored only once.

Public / Methods

Contains


[Pure]
public method Contains → (1)

element in : T

The element.

returns → bool

true if element in is contained in this collection, false if not.

Returns if this collection contains the given element.

Contains​All

3 overloads


public method ContainsAll1 → (1)

elements in : IEnumerable<T>

[not-null]
The elements.

returns → bool

true if all elements are contained in this collection, false if not.

Returns if this collection contains all given elements.

This method will return false iff there is at least one element in elements in for which Contains returns false.


public method ContainsAll2 → (1)

elements in : IBagConst<T>

[not-null]
The elements.

returns → bool

true if all elements are contained in this collection, false if not.

Returns if this collection contains all given elements.

This method will return false iff there is at least one element in elements in for which Contains returns false.


public method ContainsAll3 → (1)

elements in : IVectorConst<T>

[not-null]
The elements.

returns → bool

true if all elements are contained in this collection, false if not.

Returns if this collection contains all given elements.

This method will return false iff there is at least one element in elements in for which Contains returns false.

First


[Pure]
public method First → ()

returns → T

The first enumerated value.

Returns the first enumerated value.

If the enumeration is empty, the default element type value is returned.

Last


[Pure]
public method Last → ()

returns → T

The last enumerated value.

Returns the last enumerated value.

If the enumeration is empty, the default element type value is returned.

To​Array

2 overloads


[Pure]
public method ToArray1 → ()

returns → T [ ]

The array of elements.

Returns the elements of this enumerable object as a fresh array.


[Pure]
public method ToArray2 → (1)

order in : CompareDelegate<T>

[not-null]
The sort order.

returns → T [ ]

The array of elements.

Returns the elements of this enumerable object as a fresh array in the given order in.

To​Array​Copy


public method ToArrayCopy → (2)

array in : T [ ]

[not-null]
The output array.

offset opt : int32 = 0

[>=0]
Offset into array in.

returns → T [ ]

The filled array in.

Returns the elements of this collection as an array.

The elements in this collection will be copied into the given array, starting at the array index specified by offset opt.

Public / Attributes

Count


public attribute Count → (get)

value : int32

[>=0]
The number of elements.

The number of elements in this collection.