MW UNITY NAMESPACE








































public abstract class <T>

MContainer


The base class for generic, template data Containers.



protected T[]

Elements

T Elements.



public int

Num

The number of Elements in this Container.


CONSTRUCTOR (T[] Elements)

Summary:

Initialisation of a new Container with an Initial Size of T-defaulted Elements.

Params:

Elements:

        Initial Elements.


CONSTRUCTOR (int InitialSize)

Summary:

Initialisation of a new Container with an Initial Size of T-defaulted Elements.

Params:

InitialSize:

        Initial capacity of Elements.


CONSTRUCTOR ()

Summary:

Initialisation of a new Container with 32 T-defaulted Elements.



public T[]

Shrink ()

Summary:

Reduces this Container's memory usage to smallest possible required to store its Elements.

Returns:

The shrunk array.



public bool

IsEmpty ()

Summary:

Checks if this Container is Empty.

Returns:

True if Num <= 0. Otherwise, false.



public void

Resize (int NewSize)

Summary:

Resizes this Container to a NewSize.

Params:

NewSize:

        The new capacity of this Container.



public void

SetFromElements (T[] Elements)

Summary:

Sets this MContainer of T Elements.

Params:

Elements:

        The Elements to set.



public abstract T[]

TArray ()

Summary:

Converts this Container to a T[].

Returns:

T[].