Skip to main content

CCRawList<T>

CCRawList

Cocos2D

No-frills list that wraps an accessible array.

Inheritance: System.Object

Implements: System.Collections.Generic.IList{{T}}, System.Collections.Generic.ICollection{{T}}, System.Collections.Generic.IEnumerable{{T}}, System.Collections.IEnumerable

Constructors

CCRawList(bool)

CCRawList(bool)(System.Boolean useArrayPool)

Constructs an empty list.

Parameters:
useArrayPool (System.Boolean)
Example

CCRawList(IList, bool)

CCRawList(IList, bool)(System.Collections.Generic.IListT elements, System.Boolean useArrayPool)

Constructs a raw list from another list.

Parameters:
elements (System.Collections.Generic.IListT) - List to copy.
useArrayPool (System.Boolean)
Example

CCRawList(int, bool)

CCRawList(int, bool)(System.Int32 initialCapacity, System.Boolean useArrayPool)

Constructs an empty list.

Parameters:
initialCapacity (System.Int32) - Initial capacity to allocate for the list.
useArrayPool (System.Boolean)
Example

Fields

Elements(T[])

Direct access to the elements owned by the raw list. Be careful about the operations performed on this list; use the normal access methods if in doubt.

UseArrayPool(System.Boolean)
count(System.Int32)

Properties

Capacity(System.Int32)

Gets or sets the current size allocated for the list.

Count(System.Int32)

Gets the number of elements contained in the .

this[int](T)

Gets or sets the element of the list at the given index.

Methods

Add(T)

Add(T)(T item)

Adds an item to the .

Parameters:
item (T) - The object to add to the .
Example

Add(ref T)

Add(ref T)(T item)
Parameters:
item (T)

AddRange(CCRawList)

AddRange(CCRawList)(Cocos2D.CCRawList`1 items)

Adds a range of elements to the list from another list.

Parameters:
items (Cocos2D.CCRawList`1) - Elements to add.
Example

AddRange(CCRawList, int, int)

AddRange(CCRawList, int, int)(Cocos2D.CCRawList`1 items, System.Int32 offset, System.Int32 c)
Parameters:
items (Cocos2D.CCRawList`1)
offset (System.Int32)
c (System.Int32)

AddRange(IList)

AddRange(IList)(System.Collections.Generic.IListT items)

Adds a range of elements to the list from another list.

Parameters:
items (System.Collections.Generic.IListT) - Elements to add.
Example

AddRange(List)

AddRange(List)(System.Collections.Generic.ListT items)

Adds a range of elements to the list from another list.

Parameters:
items (System.Collections.Generic.ListT) - Elements to add.
Example

Clear()

Clear()()

Removes all items from the .

Example

Clear(bool)

Clear(bool)(System.Boolean fullClear)
Parameters:
fullClear (System.Boolean)

Contains(T)

System.Boolean Contains(T)(T item)

Determines if an item is present in the list.

Parameters:
item (T) - Item to be tested.
Returns:
System.Boolean - Whether or not the item was contained by the list.
Example

CopyTo(T[], int)

CopyTo(T[], int)(T[] array, System.Int32 arrayIndex)

Copies the list's contents to the array.

Parameters:
array (T[]) - Array to receive the list's contents.
arrayIndex (System.Int32) - Index in the array to start the dump.
Example

FastInsert(int, T)

FastInsert(int, T)(System.Int32 index, T item)

Inserts the element at the specified index without maintaining list order.

Parameters:
index (System.Int32) - Index to insert the item.
item (T) - Element to insert.
Example

FastRemove(T)

System.Boolean FastRemove(T)(T item)

Removes the first occurrence of a specific object from the collection without maintaining element order.

Parameters:
item (T) - The object to remove from the .
Returns:
System.Boolean - true if item was successfully removed from the ; otherwise, false. This method also returns false if item is not found in the original .
Example

FastRemoveAt(int)

FastRemoveAt(int)(System.Int32 index)

Removes an element from the list without maintaining order.

Parameters:
index (System.Int32) - Index of the element to remove.
Example

First()

T First()()
Returns:
T

Free()

Free()()

GetEnumerator()

Cocos2D.CCRawList`1.Enumerator GetEnumerator()()

Gets an enumerator for the list.

Returns:
Cocos2D.CCRawList`1.Enumerator - Enumerator for the list.
Example

IncreaseCount(int)

IncreaseCount(int)(System.Int32 size)
Parameters:
size (System.Int32)

IndexOf(T)

System.Int32 IndexOf(T)(T item)

Determines the index of a specific item in the .

Parameters:
item (T) - The object to locate in the .
Returns:
System.Int32 - The index of item if found in the list; otherwise, -1.
Example

Insert(int, T)

Insert(int, T)(System.Int32 index, T item)

Inserts the element at the specified index.

Parameters:
index (System.Int32) - Index to insert the item.
item (T) - Element to insert.
Example

InsertRange(int, CCRawList)

InsertRange(int, CCRawList)(System.Int32 index, Cocos2D.CCRawList`1 c)
Parameters:
index (System.Int32)
c (Cocos2D.CCRawList`1)

Last()

T Last()()
Returns:
T

PackToCount()

PackToCount()()

Peek()

T Peek()()
Returns:
T

Pop()

T Pop()()
Returns:
T

Push(T)

Push(T)(T item)
Parameters:
item (T)

Remove(T)

System.Boolean Remove(T)(T item)

Removes the first occurrence of a specific object from the .

Parameters:
item (T) - The object to remove from the .
Returns:
System.Boolean - true if item was successfully removed from the ; otherwise, false. This method also returns false if item is not found in the original .
Example

RemoveAt(int)

RemoveAt(int)(System.Int32 index)

Removes an element from the list.

Parameters:
index (System.Int32) - Index of the element to remove.
Example

RemoveAt(int, int)

RemoveAt(int, int)(System.Int32 index, System.Int32 amount)
Parameters:
index (System.Int32)
amount (System.Int32)

RemoveRange(int, int)

RemoveRange(int, int)(System.Int32 index, System.Int32 rangeCount)
Parameters:
index (System.Int32)
rangeCount (System.Int32)

Reverse()

Reverse()()

Sort(IComparer)

Sort(IComparer)(System.Collections.Generic.IComparerT comparer)

Sorts the list.

Parameters:
comparer (System.Collections.Generic.IComparerT) - Comparer to use to sort the list.
Example

ToArray()

T[] ToArray()()

Copies the elements from the list into an array.

Returns:
T[] - An array containing the elements in the list.
Example