Energy Core Library
Energy.Base.Collection.Array< T > Class Template Reference

Thread safe array of objects More...

Inheritance diagram for Energy.Base.Collection.Array< T >:

Public Member Functions

new void Clear ()
 Removes all elements from the list More...
 
New ()
 Create and add new element to list and return More...
 
bool Equals (Array< T > array)
 
new T Add (T item)
 
new T Insert (int index, T item)
 
new void Remove (T item)
 
new void RemoveAt (int index)
 
new void RemoveRange (int index, int count)
 
new void RemoveAll (Predicate< T > match)
 
new T [] ToArray ()
 

Static Public Member Functions

static Array< T > operator+ (Array< T > left, T right)
 
static Array< T > operator- (Array< T > left, T right)
 
static T [] SubArray (T[] array, int start, int count)
 Get sub array from an existing one. More...
 
static T [] SubArray (T[] array, int start, int count, bool pad)
 Get sub array from an existing one. More...
 

Properties

new T this[int index] [get, set]
 Gets or sets the element at the specified index More...
 
new int Count [get, set]
 Gets or sets the number of elements More...
 
First [get]
 Return first element or default if list is empty More...
 
Last [get]
 Return last element or default if list is empty More...
 

Detailed Description

Thread safe array of objects

Template Parameters
T

Member Function Documentation

◆ Add()

new T Energy.Base.Collection.Array< T >.Add ( item)

◆ Clear()

new void Energy.Base.Collection.Array< T >.Clear ( )

Removes all elements from the list

◆ Equals()

bool Energy.Base.Collection.Array< T >.Equals ( Array< T >  array)

◆ Insert()

new T Energy.Base.Collection.Array< T >.Insert ( int  index,
item 
)

◆ New()

Create and add new element to list and return

Returns

◆ operator+()

static Array<T> Energy.Base.Collection.Array< T >.operator+ ( Array< T >  left,
right 
)
static

◆ operator-()

static Array<T> Energy.Base.Collection.Array< T >.operator- ( Array< T >  left,
right 
)
static

◆ Remove()

new void Energy.Base.Collection.Array< T >.Remove ( item)

◆ RemoveAll()

new void Energy.Base.Collection.Array< T >.RemoveAll ( Predicate< T >  match)

◆ RemoveAt()

new void Energy.Base.Collection.Array< T >.RemoveAt ( int  index)

◆ RemoveRange()

new void Energy.Base.Collection.Array< T >.RemoveRange ( int  index,
int  count 
)

◆ SubArray() [1/2]

static T [] Energy.Base.Collection.Array< T >.SubArray ( T []  array,
int  start,
int  count 
)
static

Get sub array from an existing one.

Parameters
array
start
count
Returns

◆ SubArray() [2/2]

static T [] Energy.Base.Collection.Array< T >.SubArray ( T []  array,
int  start,
int  count,
bool  pad 
)
static

Get sub array from an existing one.

Parameters
array
start
count
pad
Returns

◆ ToArray()

new T [] Energy.Base.Collection.Array< T >.ToArray ( )

Property Documentation

◆ Count

new int Energy.Base.Collection.Array< T >.Count
getset

Gets or sets the number of elements

When setting to number which is higher than current capacity, default elements will be added to list

◆ First

T Energy.Base.Collection.Array< T >.First
get

Return first element or default if list is empty

◆ Last

Return last element or default if list is empty

◆ this[int index]

new T Energy.Base.Collection.Array< T >.this[int index]
getset

Gets or sets the element at the specified index

Parameters
index
Returns

The documentation for this class was generated from the following file: