Elm  2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
ArrayList< T, E > Class Template Reference

#include <elm/data/ArrayList.h>

Classes

class  Iter
 

Public Member Functions

 ArrayList (int n=6)
 
 ~ArrayList (void)
 
int count (void) const
 
bool contains (const T &item)
 
template<template< class _ > class C>
bool containsAll (const C< T > &coll)
 
bool isEmpty (void) const
 
 operator bool (void) const
 
void clear (void)
 
void add (const T &v)
 
template<template< class _ > class C>
void addAll (const C< T > &items)
 
void remove (const T &item)
 
template<template< class _ > class C>
void removeAll (const C< T > &items)
 
void remove (Iter i)
 
int length (void) const
 
const T & get (int index) const
 
int indexOf (const T &value, int start=0) const
 
int lastIndexOf (const T &value, int start=-1) const
 
const T & operator[] (int index) const
 
void shrink (int length)
 
void set (int index, const T &item)
 
void set (const Iter &it, const T &item)
 
T & get (int index)
 
T & operator[] (int index)
 
void insert (int index, const T &item)
 
void insert (const Iter &it, T item)
 
void removeAt (int index)
 
void removeAt (const Iter &it)
 
const T & first (void) const
 
const T & last (void) const
 
Iter find (const T &item)
 
Iter find (const T &item, Iter start) const
 
void addFirst (const T &item)
 
void addLast (const T &item)
 
void removeFirst (void)
 
void removeLast (void)
 
void addAfter (const Iter &pos, const T &item)
 
void addBefore (const Iter &pos, const T &item)
 

Constructor & Destructor Documentation

◆ ArrayList()

ArrayList ( int  n = 6)
inline

◆ ~ArrayList()

~ArrayList ( void  )
inline

Member Function Documentation

◆ add()

void add ( const T &  v)
inline

◆ addAfter()

void addAfter ( const Iter pos,
const T &  item 
)
inline

◆ addAll()

void addAll ( const C< T > &  items)
inline

◆ addBefore()

void addBefore ( const Iter pos,
const T &  item 
)
inline

◆ addFirst()

void addFirst ( const T &  item)
inline

◆ addLast()

void addLast ( const T &  item)
inline

◆ clear()

void clear ( void  )
inline

◆ contains()

bool contains ( const T &  item)
inline

References elm::equals().

Referenced by ArrayList< T, E >::containsAll().

◆ containsAll()

bool containsAll ( const C< T > &  coll)
inline

◆ count()

int count ( void  ) const
inline

◆ find() [1/2]

Iter find ( const T &  item)
inline

◆ find() [2/2]

Iter find ( const T &  item,
Iter  start 
) const
inline

References elm::equals().

◆ first()

const T& first ( void  ) const
inline

◆ get() [1/2]

T& get ( int  index)
inline

◆ get() [2/2]

const T& get ( int  index) const
inline

◆ indexOf()

int indexOf ( const T &  value,
int  start = 0 
) const
inline

References elm::equals().

◆ insert() [1/2]

void insert ( const Iter it,
item 
)
inline

◆ insert() [2/2]

◆ isEmpty()

bool isEmpty ( void  ) const
inline

◆ last()

const T& last ( void  ) const
inline

◆ lastIndexOf()

int lastIndexOf ( const T &  value,
int  start = -1 
) const
inline

◆ length()

int length ( void  ) const
inline

◆ operator bool()

operator bool ( void  ) const
inline

◆ operator[]() [1/2]

T& operator[] ( int  index)
inline

◆ operator[]() [2/2]

const T& operator[] ( int  index) const
inline

◆ remove() [1/2]

void remove ( const T &  item)
inline

◆ remove() [2/2]

void remove ( Iter  i)
inline

◆ removeAll()

void removeAll ( const C< T > &  items)
inline

◆ removeAt() [1/2]

void removeAt ( const Iter it)
inline

◆ removeAt() [2/2]

◆ removeFirst()

void removeFirst ( void  )
inline

◆ removeLast()

void removeLast ( void  )
inline

◆ set() [1/2]

void set ( const Iter it,
const T &  item 
)
inline

◆ set() [2/2]

void set ( int  index,
const T &  item 
)
inline

◆ shrink()

void shrink ( int  length)
inline

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