AVBlocks for .NET  3.0
Audio and Video Software Development Kit
ObjectCollection< T > Class Template Reference

An ordered collection of items used in AVBlocks. More...

Inheritance diagram for ObjectCollection< T >:

Protected Member Functions

override void ClearItems ()
 Overrides the default collection behavior.
 
override void InsertItem (int index, T item)
 Overrides the default collection behavior.
 
override void RemoveItem (int index)
 Overrides the default collection behavior.
 
override void SetItem (int index, T item)
 Overrides the default collection behavior.
 

Properties

bool Immutable [get]
 Returns whether the object is immutable.
 

Detailed Description

An ordered collection of items used in AVBlocks.

Implements the system interface IList of T.

Template Parameters
T

Member Function Documentation

◆ ClearItems()

override void ClearItems ( )
protected

Overrides the default collection behavior.

The list is cleared if it is not immutable.

References ObjectCollection< T >.Immutable.

◆ InsertItem()

override void InsertItem ( int  index,
item 
)
protected

Overrides the default collection behavior.

An item is inserted if both the list and the item are not immutable.

Parameters
index
item

References ObjectCollection< T >.Immutable.

◆ RemoveItem()

override void RemoveItem ( int  index)
protected

Overrides the default collection behavior.

An item is removed if the list is not immutable.

Parameters
index

References ObjectCollection< T >.Immutable.

◆ SetItem()

override void SetItem ( int  index,
item 
)
protected

Overrides the default collection behavior.

An item is set if the list is not immutable.

Parameters
index
item

References ObjectCollection< T >.Immutable.

Property Documentation

◆ Immutable

bool Immutable
get

Returns whether the object is immutable.

An immmutable object cannot be modified and all modifying methods fail to produce a result.

An immutable object can be modified by the AVBlocks library.

Object immutability spreads to all nested objects. Therefore it is not possible to add/set an immutable object to a mutable object.

When cloned an immutable object becomes mutable.


Referenced by ObjectCollection< T >.ClearItems(), ObjectCollection< T >.InsertItem(), ObjectCollection< T >.RemoveItem(), and ObjectCollection< T >.SetItem().