TINMAN 3D / REALTIME TERRAIN
Software Development Kit - User Manual

class BagConstBase in Tinman.Core.Collections

Abstract base class for IBagConst implementations.

abstract class BagConstBase with <T>  
  extends EnumerableBase<T>
  implements IBagConst<T>
  base of BagBase
  EmptySet
  MapConstBase
  VectorConstBase

Public / Attributes

Count

The number of elements in this collection.

public abstract property Count { get }
type int32
value [>=0] The number of elements.
implements IBagConst.Count

Public / Methods

Contains

Returns if this collection contains the given element.

[Pure]
public abstract method Contains (T element)
type bool
params element The element.
returns true if element is contained in this collection, false if not.
implements IBagConst.Contains

ContainsAll

Returns if this collection contains all given elements.

public 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.
implements IBagConst.ContainsAll

First

Returns the first enumerated value.

[Pure]
public virtual method First ()
type T
returns The first enumerated value.
implements IBagConst.First

Exceptions:

GetEnumerator

public abstract method GetEnumerator ()
type IEnumerator<T>
inherited EnumerableBase.GetEnumerator

Last

Returns the last enumerated value.

[Pure]
public virtual method Last ()
type T
returns The last enumerated value.
implements IBagConst.Last

Exceptions:

ToArray

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

[Pure]
public method ToArray ()
type T[]
returns [not-null] The array of elements.
implements IBagConst.ToArray

ToArrayCopy

Returns the elements of this collection as an array.

public abstract 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 [not-null] The filled array.
implements IBagConst.ToArrayCopy

Remarks:

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

ToArrayList

Returns the elements of this enumerable object as a list.

[Pure]
public virtual method ToArrayList ()
type IArrayVector<T>
returns [not-null] The list of elements.
implements IBagConst.ToArrayList

ToList

Returns the elements of this enumerable object as a list.

[Pure]
public virtual method ToList ()
type IVectorConst<T>
returns [not-null] The list of elements.
implements IBagConst.ToList

Protected / Constructors

BagConstBase

Creates a new instance of BagConstBase.

protected constructor BagConstBase ()

Creates a new instance of BagConstBase.

protected constructor BagConstBase (EqualsDelegate<T> equals)
params equals The equality delegate.

Creates a new instance of BagConstBase.

protected constructor BagConstBase (CompareDelegate<T> compare)
params compare The compare delegate.

Protected / Methods

CompareElements

Compares the given collection elements.

protected virtual method CompareElements (T a, T b)
type int32
params a First collection element.
  b Second collection element.
returns [&lt;0] if a is less than b.
[=0] if a is equal to b.
[>0] if a is greater than b.

Remarks:

The default implementation invokes the CompareDelegate that has been specified for this collection.

EmptyEnumeration

protected method EmptyEnumeration (string source)
type FailedAssertionException
params source
inherited EnumerableBase.EmptyEnumeration

EqualsElements

Checks if the given collection elements are equal.

protected virtual method EqualsElements (T a, T b)
type bool
params a First collection element.
  b Second collection element.
returns true if the collection elements are equal, false if not.

Remarks:

The default implementation invokes the EqualsDelegate that has been specified for this collection. If a CompareDelegate has been given instead, it will be invoked and its return value tested against 0.