Table of Contents

Class SparseMap<T>

Namespace
LiteEntitySystem.Collections
Assembly
LiteEntitySystem.dll
public class SparseMap<T>

Type Parameters

T
Inheritance
object
SparseMap<T>

Constructors

SparseMap()

public SparseMap()

SparseMap(int)

public SparseMap(int capacity)

Parameters

capacity int

Properties

Count

public int Count { get; }

Property Value

int

Methods

Clear()

public void Clear()

Contains(int)

public bool Contains(int id)

Parameters

id int

Returns

bool

CopyTo(SparseMap<T>)

public void CopyTo(SparseMap<T> target)

Parameters

target SparseMap<T>

FindIndex(int)

public int FindIndex(int id)

Parameters

id int

Returns

int

GetById(int)

public ref T GetById(int id)

Parameters

id int

Returns

T

GetByIndex(int)

public ref T GetByIndex(int index)

Parameters

index int

Returns

T

GetSparseEntryByIndex(int)

public ref readonly SparseMap<T>.SparseEntry GetSparseEntryByIndex(int index)

Parameters

index int

Returns

SparseMap<T>.SparseEntry

Remove(int)

public bool Remove(int id)

Parameters

id int

Returns

bool

Remove(int, out T)

public bool Remove(int id, out T removedElement)

Parameters

id int
removedElement T

Returns

bool

Set(int, T)

public void Set(int id, T value)

Parameters

id int
value T

TryGetSparseEntry(int, out SparseEntry)

public bool TryGetSparseEntry(int id, out SparseMap<T>.SparseEntry result)

Parameters

id int
result SparseMap<T>.SparseEntry

Returns

bool

TryGetValue(int, out T)

public bool TryGetValue(int id, out T result)

Parameters

id int
result T

Returns

bool