Table of Contents

Class BinaryHeap.SyncBinaryHeap

Namespace
Sportradar.LiveData.Sdk.Services.PriorityQueue
Assembly
Sportradar.LiveData.Sdk.dll

A synchronized BinaryHeap.

public class BinaryHeap.SyncBinaryHeap : BinaryHeap, ICollection, IEnumerable, ICloneable
Inheritance
BinaryHeap.SyncBinaryHeap
Implements
Inherited Members

Properties

Count

Gets the number of objects stored in the heap.

public override int Count { get; }

Property Value

int

IsSynchronized

Gets a value indicating whether this heap is synchronized.

public override bool IsSynchronized { get; }

Property Value

bool

Methods

Clear()

Empties the heap.

public override void Clear()

Clone()

Performs a shallow-copy of the heap.

public override BinaryHeap Clone()

Returns

BinaryHeap

A shallow-copy of the heap.

Contains(object)

Determines whether an object is in the heap.

public override bool Contains(object value)

Parameters

value object

The object for which we want to search.

Returns

bool

Whether the object is in the heap.

CopyTo(Array, int)

Copies the entire heap to a compatible one-dimensional array, starting at the given index.

public override void CopyTo(Array array, int index)

Parameters

array Array

The array to which the heap should be copied.

index int

The starting index.

GetEnumerator()

Gets an enumerator for the heap.

public override IEnumerator GetEnumerator()

Returns

IEnumerator

An enumerator for all elements of the heap.

Insert(object, object)

Adds an item to the heap.

public override void Insert(object key, object value)

Parameters

key object

The key for this entry.

value object

The value for this entry.

Remove()

Removes the entry at the top of the heap.

public override object Remove()

Returns

object

The removed entry.