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

class SortedSetBase in Tinman.Core.Collections

Abstract base class for ISortedSetConst implementations.

abstract class SortedSetBase with <T>  
  extends BagBase<T>
  implements ISortedSet<T>
  base of TreeSet

Public / Attributes

Count

The number of elements in this collection.

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

Maximum

Returns the maximum element of this set.

public abstract property Maximum { get }
type T
value The maximum element.
implements ISortedSetConst.Maximum

Minimum

Returns the minimum element of this set.

public abstract property Minimum { get }
type T
value The minimum element.
implements ISortedSetConst.Minimum

Public / Methods

Add

Adds the given element to this collection.

public abstract method Add (T element)
type bool
params element The element to add.
returns true if the collection has changed, false if not.
inherited BagBase.Add

Remarks:

Implementing methods shall return false iff the element has already been collected, i.e. it is contained in the collection. If in doubt, return true.

AddAll

Adds the given elements to this collection.

public method AddAll (IEnumerable<T> elements)
type bool
params elements [not-null] The elements to add.
returns true if the collection has changed, false if not.
inherited BagBase.AddAll

Adds the given elements to this collection.

public virtual method AddAll (T[] elements, int32 first = 0, int32 count = -1)
type bool
params elements [not-null] The elements to add.
  first [>=0] Index of first element to add.
  count [>=-1] Number of elements to add. If -1 all elements from first to the last element are added.
returns true if the collection has changed, false if not.
inherited BagBase.AddAll

Clear

Removes all elements from this collection.

public abstract method Clear ()
inherited BagBase.Clear

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.
inherited BagConstBase.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.
inherited BagConstBase.ContainsAll

CountValuesInRange

Counts the values in this set that lie within the given range.

public abstract method CountValuesInRange (T from, T to)
type int32
params from Start of range, inclusive.
  to End of range, exclusive.
returns [not-null] The values in the range.
implements ISortedSet.CountValuesInRange

First

Returns the first enumerated value.

[Pure]
public override method First ()
type T
returns The first enumerated value.
overrides BagConstBase.First

Exceptions:

GetEnumerator

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

GetValuesInRange

Returns the values in this set that lie within the given range.

public abstract method GetValuesInRange (T from, T to)
type T[]
params from Start of range, inclusive.
  to End of range, exclusive.
returns [>=0] The number of values in the given range.
implements ISortedSet.GetValuesInRange

Last

Returns the last enumerated value.

[Pure]
public override method Last ()
type T
returns The last enumerated value.
overrides BagConstBase.Last

Exceptions:

Remove

Removes the given element from this collection.

public abstract method Remove (T element)
type bool
params element The element to remove.
returns true if the collection has changed, false if not.
inherited BagBase.Remove

RemoveAll

Removes the given elements from this collection.

public method RemoveAll (IEnumerable<T> elements)
type bool
params elements [not-null] The elements to remove.
returns true if the collection has changed, false if not.
inherited BagBase.RemoveAll

RemoveMaximum

Removes the maximum element from this set.

public abstract method RemoveMaximum ()
type T
returns The removed element.
implements ISortedSet.RemoveMaximum

RemoveMinimum

Removes the minimum element from this set.

public abstract method RemoveMinimum ()
type T
returns The removed element.
implements ISortedSet.RemoveMinimum

RemoveWhere

Removes all elements from this collection for which the given predicate evaluates to true.

public virtual method RemoveWhere (PredicateDelegate<T> predicate)
type bool
params predicate [not-null] The predicate to use.
returns true if the collection has changed, false if not.
inherited BagBase.RemoveWhere

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.
inherited BagConstBase.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.
inherited BagConstBase.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.
inherited BagConstBase.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.
inherited BagConstBase.ToList

Protected / Constructors

SortedSetBase

protected constructor SortedSetBase (CompareDelegate<T> compare)
params compare

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.
inherited BagConstBase.CompareElements

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.
inherited BagConstBase.EqualsElements

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.