Vector

template <typename Element>
class Vector : public Countable<Element>

Vector class template.

Public Types

template<>
typedef int (*Comparer)(const Element &lhs, const Element &rhs)

Public Functions

Vector(unsigned int initialCapacity = 10, unsigned int capacityIncrement = 10)
Vector(const Vector &rhv)
~Vector()
unsigned int capacity() const
bool contains(const Element &elem) const
const Element &firstElement() const
int indexOf(const Element &elem) const
bool isEmpty() const
const Element &lastElement() const
int lastIndexOf(const Element &elem) const
unsigned int count() const
unsigned int size() const
void copyInto(Element *array) const
bool add(const Element &obj)
bool addElement(const Element &obj)
bool addElement(Element *objp)
void clear()
bool ensureCapacity(unsigned int minCapacity)
void removeAllElements()
bool removeElement(const Element &obj)
bool setSize(unsigned int newSize)
void trimToSize()
const Element &elementAt(unsigned int index) const
bool insertElementAt(const Element &obj, unsigned int index)
const void remove(unsigned int index)
void removeElementAt(unsigned int index)
bool setElementAt(const Element &obj, unsigned int index)
const Element &get(unsigned int index) const
const Element &operator[](unsigned int index) const
Element &operator[](unsigned int index)
const Vector<Element> &operator=(const Vector<Element> &rhv)
const Vector<Element> &operator=(const Vector<Element> &&other)
void sort(Comparer compareFunction)
const Element &at(unsigned int i) const