sk::util::ArrayList< T > Class Template Reference

#include <ArrayList.hxx>

Inheritance diagram for sk::util::ArrayList< T >:

sk::util::AbstractList< T > sk::util::AbstractCollection< T > sk::util::List< T > sk::util::Collection< T > sk::util::Collection< T > sk::util::Object sk::util::Object

List of all members.

Public Member Functions

 ArrayList ()
virtual ~ArrayList ()
const sk::util::Class getClass () const
 Returns the object's class.
void clear ()
 Removes all of the elements from this collection.
int size () const
 Returns the number of elements in this collection.
bool isEmpty () const
 Returns true if this collection contains no elements.
bool add (T &object)
 Ensures that this collection contains the specified element. A reference is added as needed.
bool add (T *object)
 Ensures that this collection contains the specified element. A pointer ownership will be assumed.
void forEach (const sk::util::Processor< T > &processor) const
T & get (int index) const
void add (int index, T &object)
void add (int index, T *object)
bool addAll (int index, const Collection< T > &other)
bool addAll (const Collection< T > &other)
 Adds all of the elements in the specified collection to this collection.
bool moveAll (int index, Collection< T > &other)
bool moveAll (Collection< T > &other)
 Moves all of the elements from the specified collection to this collection.
T & get (const Selector< T > &selector) const
int indexOf (const T &object) const
int indexOf (const Selector< T > &selector) const
int lastIndexOf (const T &object) const
int lastIndexOf (const Selector< T > &selector) const
T & remove (int index)
bool remove (const T &object)
 Removes a single instance of the specified element from this collection, if it is present.
bool remove (const Selector< T > &selector)
 Removes a single element from this collection for which the specified selector assesses to true.
T * cutoff (int index)
T * cutoff (const T &object)
T * cutoff (const Selector< T > &selector)
T * release (int index)
T * release (const T &object)
T * release (const Selector< T > &selector)
void set (int index, T &object)
void set (int index, T *object)
bool find (sk::util::Holder< T > &holder, const Selector< T > &selector) const
bool contains (const T &object) const
 Returns true if this collection contains the specified element.
bool contains (const Selector< T > &selector) const
 Returns true if the specified selector assesses to true for any element of this collection.
bool containsAll (const Collection< T > &other) const
 Returns true if this collection contains all of the elements in the specified collection.
bool removeAll (const Collection< T > &other)
 Removes all of this collection's elements that are also contained in the specified collection.
bool removeAll (const Selector< T > &selector)
 Removes all of this collection's elements for which the specified selector assesses to true.
bool retainAll (const Collection< T > &other)
 Retains only the elements in this collection that are contained in the specified collection.
bool retainAll (const Selector< T > &selector)
 Retains only the elements in this collection for whitch the specified selector assesses to true.
virtual Objectself ()
 Returns a reference to itself.
virtual const Objectself () const
Objectclone () const
 Instantiates another object of the same class as a copy of itself.
virtual uint64_t getId () const
 Returns a unique object id.
virtual const String toString () const
 Returns a string representation of the object. By default, it returns the object's class and the objects's id.
virtual const String inspect () const
 Returns a string containing human-readable representation of the object.

template<class T>
class sk::util::ArrayList< T >


Constructor & Destructor Documentation

template<class T >
sk::util::ArrayList< T >::ArrayList (  )  [inline]

template<class T >
sk::util::ArrayList< T >::~ArrayList (  )  [inline, virtual]


Member Function Documentation

void sk::util::AbstractList< T >::add ( int  index,
T *  object 
) [virtual, inherited]

Implements sk::util::List< T >.

void sk::util::AbstractList< T >::add ( int  index,
T &  object 
) [virtual, inherited]

Implements sk::util::List< T >.

template<class T >
bool sk::util::ArrayList< T >::add ( T *  object  )  [inline, virtual]

Ensures that this collection contains the specified element. A pointer ownership will be assumed.

Reimplemented from sk::util::AbstractCollection< T >.

template<class T >
bool sk::util::ArrayList< T >::add ( T &  object  )  [inline, virtual]

Ensures that this collection contains the specified element. A reference is added as needed.

Reimplemented from sk::util::AbstractCollection< T >.

bool sk::util::AbstractCollection< T >::addAll ( const Collection< T > &  other  )  [virtual, inherited]

Adds all of the elements in the specified collection to this collection.

Implements sk::util::Collection< T >.

bool sk::util::AbstractList< T >::addAll ( int  index,
const Collection< T > &  other 
) [virtual, inherited]

Implements sk::util::List< T >.

template<class T >
void sk::util::ArrayList< T >::clear (  )  [inline, virtual]

Removes all of the elements from this collection.

Reimplemented from sk::util::AbstractCollection< T >.

Object* sk::util::Object::clone (  )  const [inherited]

Instantiates another object of the same class as a copy of itself.

Reimplemented in sk::rt::logger::Destination, and sk::util::String.

bool sk::util::AbstractCollection< T >::contains ( const Selector< T > &  selector  )  const [virtual, inherited]

Returns true if the specified selector assesses to true for any element of this collection.

Implements sk::util::Collection< T >.

bool sk::util::AbstractCollection< T >::contains ( const T &  object  )  const [virtual, inherited]

Returns true if this collection contains the specified element.

Implements sk::util::Collection< T >.

bool sk::util::AbstractCollection< T >::containsAll ( const Collection< T > &  other  )  const [virtual, inherited]

Returns true if this collection contains all of the elements in the specified collection.

Implements sk::util::Collection< T >.

T * sk::util::AbstractCollection< T >::cutoff ( const Selector< T > &  selector  )  [virtual, inherited]

T * sk::util::AbstractCollection< T >::cutoff ( const T &  object  )  [virtual, inherited]

T * sk::util::AbstractList< T >::cutoff ( int  index  )  [virtual, inherited]

Implements sk::util::List< T >.

bool sk::util::AbstractCollection< T >::find ( sk::util::Holder< T > &  holder,
const Selector< T > &  selector 
) const [virtual, inherited]

template<class T >
void sk::util::ArrayList< T >::forEach ( const sk::util::Processor< T > &  processor  )  const [inline, virtual]

Reimplemented from sk::util::AbstractCollection< T >.

T & sk::util::AbstractCollection< T >::get ( const Selector< T > &  selector  )  const [virtual, inherited]

template<class T >
T & sk::util::ArrayList< T >::get ( int  index  )  const [inline, virtual]

Reimplemented from sk::util::AbstractList< T >.

template<class T >
const sk::util::Class sk::util::ArrayList< T >::getClass (  )  const [inline, virtual]

Returns the object's class.

Reimplemented from sk::util::AbstractList< T >.

virtual uint64_t sk::util::Object::getId (  )  const [virtual, inherited]

Returns a unique object id.

Reimplemented in sk::rt::Thread.

int sk::util::AbstractList< T >::indexOf ( const Selector< T > &  selector  )  const [virtual, inherited]

Implements sk::util::List< T >.

int sk::util::AbstractList< T >::indexOf ( const T &  object  )  const [virtual, inherited]

Implements sk::util::List< T >.

virtual const String sk::util::Object::inspect (  )  const [virtual, inherited]

template<class T >
bool sk::util::ArrayList< T >::isEmpty (  )  const [inline, virtual]

Returns true if this collection contains no elements.

Reimplemented from sk::util::AbstractCollection< T >.

int sk::util::AbstractList< T >::lastIndexOf ( const Selector< T > &  selector  )  const [virtual, inherited]

Implements sk::util::List< T >.

int sk::util::AbstractList< T >::lastIndexOf ( const T &  object  )  const [virtual, inherited]

Implements sk::util::List< T >.

bool sk::util::AbstractCollection< T >::moveAll ( Collection< T > &  other  )  [virtual, inherited]

Moves all of the elements from the specified collection to this collection.

Implements sk::util::Collection< T >.

bool sk::util::AbstractList< T >::moveAll ( int  index,
Collection< T > &  other 
) [virtual, inherited]

Implements sk::util::List< T >.

T * sk::util::AbstractCollection< T >::release ( const Selector< T > &  selector  )  [virtual, inherited]

T * sk::util::AbstractCollection< T >::release ( const T &  object  )  [virtual, inherited]

T * sk::util::AbstractList< T >::release ( int  index  )  [virtual, inherited]

Implements sk::util::List< T >.

bool sk::util::AbstractCollection< T >::remove ( const Selector< T > &  selector  )  [virtual, inherited]

Removes a single element from this collection for which the specified selector assesses to true.

Implements sk::util::Collection< T >.

bool sk::util::AbstractCollection< T >::remove ( const T &  object  )  [virtual, inherited]

Removes a single instance of the specified element from this collection, if it is present.

Implements sk::util::Collection< T >.

T & sk::util::AbstractList< T >::remove ( int  index  )  [virtual, inherited]

Implements sk::util::List< T >.

bool sk::util::AbstractCollection< T >::removeAll ( const Selector< T > &  selector  )  [virtual, inherited]

Removes all of this collection's elements for which the specified selector assesses to true.

Implements sk::util::Collection< T >.

bool sk::util::AbstractCollection< T >::removeAll ( const Collection< T > &  other  )  [virtual, inherited]

Removes all of this collection's elements that are also contained in the specified collection.

Implements sk::util::Collection< T >.

bool sk::util::AbstractCollection< T >::retainAll ( const Selector< T > &  selector  )  [virtual, inherited]

Retains only the elements in this collection for whitch the specified selector assesses to true.

Implements sk::util::Collection< T >.

bool sk::util::AbstractCollection< T >::retainAll ( const Collection< T > &  other  )  [virtual, inherited]

Retains only the elements in this collection that are contained in the specified collection.

Implements sk::util::Collection< T >.

virtual const Object& sk::util::Object::self (  )  const [virtual, inherited]

Reimplemented in sk::util::String.

virtual Object& sk::util::Object::self (  )  [virtual, inherited]

Returns a reference to itself.

Reimplemented in sk::util::String.

void sk::util::AbstractList< T >::set ( int  index,
T *  object 
) [virtual, inherited]

Implements sk::util::List< T >.

void sk::util::AbstractList< T >::set ( int  index,
T &  object 
) [virtual, inherited]

Implements sk::util::List< T >.

template<class T >
int sk::util::ArrayList< T >::size (  )  const [inline, virtual]

Returns the number of elements in this collection.

Reimplemented from sk::util::AbstractCollection< T >.

virtual const String sk::util::Object::toString (  )  const [virtual, inherited]

Returns a string representation of the object. By default, it returns the object's class and the objects's id.

Reimplemented in sk::rt::logger::Level, sk::rt::thread::State, sk::util::Boolean, sk::util::Class, sk::util::Container, sk::util::Pathname, and sk::util::String.


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

Generated on Tue Mar 3 12:36:10 2009 for stemkit-cpp by  doxygen 1.5.8