Craig's Utility Library  4.0 Beta
Utilities.DataTypes.Bag< T > Class Template Reference

Used to count the number of times something is added to the list More...

Inheritance diagram for Utilities.DataTypes.Bag< T >:

Public Member Functions

 Bag ()
 Constructor More...
 
virtual void Add (T item)
 Adds an item to the bag More...
 
virtual void Clear ()
 Clears the bag More...
 
virtual bool Contains (T item)
 Determines if the bag contains an item More...
 
virtual void CopyTo (T[] array, int arrayIndex)
 Copies the bag to an array More...
 
virtual IEnumerator< T > GetEnumerator ()
 Gets the enumerator More...
 
virtual bool Remove (T item)
 Removes an item from the bag More...
 

Properties

virtual int Count [get]
 Number of items in the bag More...
 
virtual bool IsReadOnly [get]
 Is this read only? More...
 
ConcurrentDictionary< T, int > Items [get]
 Actual internal container More...
 
virtual int this[T index] [get, set]
 Gets a specified item More...
 

Detailed Description

Used to count the number of times something is added to the list

Template Parameters
TType of data within the bag

Definition at line 33 of file Bag.cs.

Constructor & Destructor Documentation

Constructor

Definition at line 38 of file Bag.cs.

Member Function Documentation

virtual void Utilities.DataTypes.Bag< T >.Add ( item)
virtual

Adds an item to the bag

Parameters
itemItem to add

Definition at line 79 of file Bag.cs.

virtual void Utilities.DataTypes.Bag< T >.Clear ( )
virtual

Clears the bag

Definition at line 87 of file Bag.cs.

virtual bool Utilities.DataTypes.Bag< T >.Contains ( item)
virtual

Determines if the bag contains an item

Parameters
itemItem to check
Returns
True if it does, false otherwise

Definition at line 97 of file Bag.cs.

virtual void Utilities.DataTypes.Bag< T >.CopyTo ( T[]  array,
int  arrayIndex 
)
virtual

Copies the bag to an array

Parameters
arrayArray to copy to
arrayIndexIndex to start at

Definition at line 107 of file Bag.cs.

virtual IEnumerator<T> Utilities.DataTypes.Bag< T >.GetEnumerator ( )
virtual

Gets the enumerator

Returns
The enumerator

Definition at line 116 of file Bag.cs.

virtual bool Utilities.DataTypes.Bag< T >.Remove ( item)
virtual

Removes an item from the bag

Parameters
itemItem to remove
Returns
True if it is removed, false otherwise

Definition at line 127 of file Bag.cs.

Property Documentation

virtual int Utilities.DataTypes.Bag< T >.Count
get

Number of items in the bag

Definition at line 47 of file Bag.cs.

virtual bool Utilities.DataTypes.Bag< T >.IsReadOnly
get

Is this read only?

Definition at line 55 of file Bag.cs.

ConcurrentDictionary<T, int> Utilities.DataTypes.Bag< T >.Items
getprotected

Actual internal container

Definition at line 62 of file Bag.cs.

virtual int Utilities.DataTypes.Bag< T >.this[T index]
getset

Gets a specified item

Parameters
indexItem to get
Returns
The number of this item in the bag

Definition at line 70 of file Bag.cs.


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