Naanou.Common.KeyStorage
Class Collection

Stores Keys

Field Summary
Naanou.Common.KeyContainer[] _data
int _defaultCapacity
int _size

Constructor Summary
Collection()
         Constructor
Collection(Naanou.Common.KeyStorage.Collection x)
         Constructor
Collection(Naanou.Common.KeyContainer[] x)
         Constructor

Property Summary
int Count
         Gets number of elements contained in list
Naanou.Common.KeyContainer Item[int index]
         Gets or sets a value at an index

Method Summary
int Add(Naanou.Common.KeyContainer x)
         Adds new item
void AddRange(Naanou.Common.KeyContainer[] x)
         Adds a range of items
void AddRange(Naanou.Common.KeyStorage.Collection x)
         Adds a collection of items
void Clear()
         Clears all data
bool Contains(Naanou.Common.KeyContainer x)
         Does the list contain an item?
void CopyTo(Naanou.Common.KeyContainer[] array, int index)
         Copies contents of list to an array
void EnsureCapacity(int capacity)
Naanou.Common.KeyStorage.Enumerator GetEnumerator()
         Gets enumerator
object ICloneable.Clone()
void ICollection.CopyTo(System.Array array, int index)
System.Collections.IEnumerator IEnumerable.GetEnumerator()
int IList.Add(object val)
bool IList.Contains(object x)
int IList.IndexOf(object x)
void IList.Insert(int index, object x)
void IList.Remove(object x)
void IList.RemoveAt(int index)
int IndexOf(Naanou.Common.KeyContainer x)
         Gets the index of an item
void Insert(int index, Naanou.Common.KeyContainer x)
         Inserts an item at a particular index
void Remove(Naanou.Common.KeyContainer x)
         Removes an item
void SetCapacity(int capacity)
         Sets the capacity of list

Methods inherited from class System.Object
Equals, Finalize, GetHashCode, GetType, MemberwiseClone, ToString


Field Detail

_data

private Naanou.Common.KeyContainer[] _data


_defaultCapacity

private int _defaultCapacity


_size

private int _size

Constructor Detail

Collection

public Collection()

Constructor


Collection

public Collection(Naanou.Common.KeyStorage.Collection x)

Constructor


Collection

public Collection(Naanou.Common.KeyContainer[] x)

Constructor

Property Detail

Count

public int Count

Gets number of elements contained in list


Item

public Naanou.Common.KeyContainer this[int index]

Gets or sets a value at an index

Method Detail

Add

public int Add(Naanou.Common.KeyContainer x)

Adds new item

Parameters:
x - Item
Returns:
New length of list

AddRange

public void AddRange(Naanou.Common.KeyContainer[] x)

Adds a range of items

Parameters:
x - Range

AddRange

public void AddRange(Naanou.Common.KeyStorage.Collection x)

Adds a collection of items

Parameters:
x -

Clear

public void Clear()

Clears all data


Contains

public bool Contains(Naanou.Common.KeyContainer x)

Does the list contain an item?

Parameters:
x - Item to find
Returns:
TRUE if list contains item

CopyTo

public void CopyTo(Naanou.Common.KeyContainer[] array,
                   int index)

Copies contents of list to an array

Parameters:
array - Array
index - Index to start inserting from

EnsureCapacity

private void EnsureCapacity(int capacity)


GetEnumerator

public Naanou.Common.KeyStorage.Enumerator GetEnumerator()

Gets enumerator

Returns:

ICloneable.Clone

private object ICloneable.Clone()


ICollection.CopyTo

private void ICollection.CopyTo(System.Array array,
                                int index)


IEnumerable.GetEnumerator

private System.Collections.IEnumerator IEnumerable.GetEnumerator()


IList.Add

private int IList.Add(object val)


IList.Contains

private bool IList.Contains(object x)


IList.IndexOf

private int IList.IndexOf(object x)


IList.Insert

private void IList.Insert(int index,
                          object x)


IList.Remove

private void IList.Remove(object x)


IList.RemoveAt

private void IList.RemoveAt(int index)


IndexOf

public int IndexOf(Naanou.Common.KeyContainer x)

Gets the index of an item

Parameters:
x - Item
Returns:
Index of item, or -1 if not found

Insert

public void Insert(int index,
                   Naanou.Common.KeyContainer x)

Inserts an item at a particular index

Parameters:
index - Index
x - Item

Remove

public void Remove(Naanou.Common.KeyContainer x)

Removes an item

Parameters:
x - Item to remove

SetCapacity

public void SetCapacity(int capacity)

Sets the capacity of list

Parameters:
capacity -