#include <Collection.h>
Public Member Functions | |
virtual T & | get (const Selector< T > &selector) const =0 |
virtual void | forEach (const Processor< T > &procesor) const =0 |
virtual bool | find (sk::util::Holder< T > &holder, const Selector< T > &selector) const =0 |
virtual bool | isEmpty () const =0 |
Returns true if this collection contains no elements. | |
virtual int | size () const =0 |
Returns the number of elements in this collection. | |
virtual bool | contains (const T &object) const =0 |
Returns true if this collection contains the specified element. | |
virtual bool | contains (const Selector< T > &selector) const =0 |
Returns true if the specified selector assesses to true for any element of this collection. | |
virtual bool | containsAll (const Collection< T > &other) const =0 |
Returns true if this collection contains all of the elements in the specified collection. | |
virtual bool | add (T &object)=0 |
Ensures that this collection contains the specified element. A reference is added as needed. | |
virtual bool | add (T *object)=0 |
Ensures that this collection contains the specified element. A pointer ownership will be assumed. | |
virtual bool | addAll (const Collection< T > &other)=0 |
Adds all of the elements in the specified collection to this collection. | |
virtual bool | moveAll (Collection< T > &other)=0 |
Moves all of the elements from the specified collection to this collection. | |
virtual void | clear ()=0 |
Removes all of the elements from this collection. | |
virtual bool | remove (const T &object)=0 |
Removes a single instance of the specified element from this collection, if it is present. | |
virtual bool | remove (const Selector< T > &selector)=0 |
Removes a single element from this collection for which the specified selector assesses to true. | |
virtual T * | cutoff (const T &object)=0 |
virtual T * | cutoff (const Selector< T > &selector)=0 |
virtual T * | release (const T &object)=0 |
virtual T * | release (const Selector< T > &selector)=0 |
virtual bool | removeAll (const Collection< T > &other)=0 |
Removes all of this collection's elements that are also contained in the specified collection. | |
virtual bool | removeAll (const Selector< T > &selector)=0 |
Removes all of this collection's elements for which the specified selector assesses to true. | |
virtual bool | retainAll (const Collection< T > &other)=0 |
Retains only the elements in this collection that are contained in the specified collection. | |
virtual bool | retainAll (const Selector< T > &selector)=0 |
Retains only the elements in this collection for whitch the specified selector assesses to true. | |
virtual Object & | self () |
Returns a reference to itself. | |
virtual const Object & | self () const |
Object * | clone () const |
Instantiates another object of the same class as a copy of itself. | |
virtual const Class | getClass () const |
Returns the object's class. | |
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. |
virtual bool sk::util::Collection< T >::add | ( | T * | object | ) | [pure virtual] |
Ensures that this collection contains the specified element. A pointer ownership will be assumed.
Implemented in sk::rt::SynchronizedCollection< T >, sk::util::AbstractCollection< T >, sk::util::ArrayList< T >, sk::rt::SynchronizedCollection< T >, and sk::util::AbstractCollection< T >.
virtual bool sk::util::Collection< T >::add | ( | T & | object | ) | [pure virtual] |
Ensures that this collection contains the specified element. A reference is added as needed.
Implemented in sk::rt::SynchronizedCollection< T >, sk::util::AbstractCollection< T >, sk::util::ArrayList< T >, sk::rt::SynchronizedCollection< T >, and sk::util::AbstractCollection< T >.
virtual bool sk::util::Collection< T >::addAll | ( | const Collection< T > & | other | ) | [pure virtual] |
Adds all of the elements in the specified collection to this collection.
Implemented in sk::util::AbstractCollection< T >, and sk::util::AbstractCollection< T >.
virtual void sk::util::Collection< T >::clear | ( | ) | [pure virtual] |
Removes all of the elements from this collection.
Implemented in sk::rt::SynchronizedCollection< T >, sk::util::AbstractCollection< T >, sk::util::ArrayList< T >, sk::rt::SynchronizedCollection< T >, and 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.
virtual bool sk::util::Collection< T >::contains | ( | const Selector< T > & | selector | ) | const [pure virtual] |
Returns true if the specified selector assesses to true for any element of this collection.
Implemented in sk::util::AbstractCollection< T >, and sk::util::AbstractCollection< T >.
virtual bool sk::util::Collection< T >::contains | ( | const T & | object | ) | const [pure virtual] |
Returns true if this collection contains the specified element.
Implemented in sk::rt::SynchronizedCollection< T >, sk::util::AbstractCollection< T >, sk::rt::SynchronizedCollection< T >, and sk::util::AbstractCollection< T >.
virtual bool sk::util::Collection< T >::containsAll | ( | const Collection< T > & | other | ) | const [pure virtual] |
Returns true if this collection contains all of the elements in the specified collection.
Implemented in sk::util::AbstractCollection< T >, and sk::util::AbstractCollection< T >.
virtual T* sk::util::Collection< T >::cutoff | ( | const Selector< T > & | selector | ) | [pure virtual] |
Implemented in sk::util::AbstractCollection< T >, and sk::util::AbstractCollection< T >.
virtual T* sk::util::Collection< T >::cutoff | ( | const T & | object | ) | [pure virtual] |
virtual bool sk::util::Collection< T >::find | ( | sk::util::Holder< T > & | holder, | |
const Selector< T > & | selector | |||
) | const [pure virtual] |
Implemented in sk::util::AbstractCollection< T >, and sk::util::AbstractCollection< T >.
virtual void sk::util::Collection< T >::forEach | ( | const Processor< T > & | procesor | ) | const [pure virtual] |
Implemented in sk::util::AbstractCollection< T >, sk::util::ArrayList< T >, and sk::util::AbstractCollection< T >.
virtual T& sk::util::Collection< T >::get | ( | const Selector< T > & | selector | ) | const [pure virtual] |
Implemented in sk::util::AbstractCollection< T >, and sk::util::AbstractCollection< T >.
virtual const Class sk::util::Object::getClass | ( | ) | const [virtual, inherited] |
Returns the object's class.
Reimplemented in sk::cppunit::SourcePath, sk::io::AbstractInputStream, sk::io::AbstractOutputStream, sk::io::AbstractPipe, sk::io::AnonymousPipe, sk::io::BufferedInputStream, sk::io::BufferedOutputStream, sk::io::ByteArrayInputStream, sk::io::ByteArrayOutputStream, sk::io::ClosedChannelException, sk::io::DataInputStream, sk::io::DataOutputStream, sk::io::DelegatingInputStream, sk::io::DelegatingOutputStream, sk::io::DelegatingTty, sk::io::EOFException, sk::io::File, sk::io::FileDescriptor, sk::io::FileDescriptorInputStream, sk::io::FileDescriptorOutputStream, sk::io::FileInputStream, sk::io::FileOutputStream, sk::io::IOException, sk::io::Pty, sk::io::TtyDevice, sk::io::TtyFileDescriptor, sk::net::ip4::Address, sk::rt::config::CwdUprootLocator, sk::rt::config::HomeLocator, sk::rt::config::InlineLocator, sk::rt::config::SpotLocator, sk::rt::config::UprootLocator, sk::rt::logger::Level, sk::rt::logger::Spot, sk::rt::logger::Stream, sk::rt::Mutex, sk::rt::ReentrantLock, sk::rt::scope::Aggregator, sk::rt::scope::Controller, sk::rt::Scope, sk::rt::thread::abstract::Factory, sk::rt::thread::AbstractLock, sk::rt::thread::Exit, sk::rt::thread::State, sk::rt::Thread, sk::sys::AbstractProcessListener, sk::sys::DelegatingExecutable, sk::sys::Group, sk::sys::Pipeline, sk::sys::PipeProcess, sk::sys::Process, sk::sys::PtyProcess, sk::sys::User, sk::util::AbstractCollection< T >, sk::util::AbstractList< T >, sk::util::ArrayList< T >, sk::util::Boolean, sk::util::Class, sk::util::Container, sk::util::Exception, sk::util::IllegalStateException, sk::util::IndexOutOfBoundsException, sk::util::InsufficientMemoryException, sk::util::Integer, sk::util::InterruptedException, sk::util::Method, sk::util::MissingResourceException, sk::util::NoSuchElementException, sk::util::NullPointerException, sk::util::NumberFormatException, sk::util::Pathname, sk::util::String, sk::util::StringArray, sk::util::StringHash, sk::util::SystemException, sk::util::UnsupportedOperationException, sk::util::AbstractCollection< T >, and sk::util::AbstractList< T >.
virtual uint64_t sk::util::Object::getId | ( | ) | const [virtual, inherited] |
virtual const String sk::util::Object::inspect | ( | ) | const [virtual, inherited] |
Returns a string containing human-readable representation of the object.
Reimplemented in sk::rt::thread::AbstractLock, sk::rt::Thread, sk::util::Class, sk::util::Container, sk::util::slot::Pointer< T, Mixin >, sk::util::slot::Reference< T, Mixin >, sk::util::String, and sk::util::StringArray.
virtual bool sk::util::Collection< T >::isEmpty | ( | ) | const [pure virtual] |
Returns true if this collection contains no elements.
Implemented in sk::rt::SynchronizedCollection< T >, sk::util::AbstractCollection< T >, sk::util::ArrayList< T >, sk::rt::SynchronizedCollection< T >, and sk::util::AbstractCollection< T >.
virtual bool sk::util::Collection< T >::moveAll | ( | Collection< T > & | other | ) | [pure virtual] |
Moves all of the elements from the specified collection to this collection.
Implemented in sk::util::AbstractCollection< T >, and sk::util::AbstractCollection< T >.
virtual T* sk::util::Collection< T >::release | ( | const Selector< T > & | selector | ) | [pure virtual] |
Implemented in sk::util::AbstractCollection< T >, and sk::util::AbstractCollection< T >.
virtual T* sk::util::Collection< T >::release | ( | const T & | object | ) | [pure virtual] |
virtual bool sk::util::Collection< T >::remove | ( | const Selector< T > & | selector | ) | [pure virtual] |
Removes a single element from this collection for which the specified selector assesses to true.
Implemented in sk::util::AbstractCollection< T >, and sk::util::AbstractCollection< T >.
virtual bool sk::util::Collection< T >::remove | ( | const T & | object | ) | [pure virtual] |
Removes a single instance of the specified element from this collection, if it is present.
Implemented in sk::rt::SynchronizedCollection< T >, sk::util::AbstractCollection< T >, sk::rt::SynchronizedCollection< T >, and sk::util::AbstractCollection< T >.
virtual bool sk::util::Collection< T >::removeAll | ( | const Selector< T > & | selector | ) | [pure virtual] |
Removes all of this collection's elements for which the specified selector assesses to true.
Implemented in sk::util::AbstractCollection< T >, and sk::util::AbstractCollection< T >.
virtual bool sk::util::Collection< T >::removeAll | ( | const Collection< T > & | other | ) | [pure virtual] |
Removes all of this collection's elements that are also contained in the specified collection.
Implemented in sk::util::AbstractCollection< T >, and sk::util::AbstractCollection< T >.
virtual bool sk::util::Collection< T >::retainAll | ( | const Selector< T > & | selector | ) | [pure virtual] |
Retains only the elements in this collection for whitch the specified selector assesses to true.
Implemented in sk::util::AbstractCollection< T >, and sk::util::AbstractCollection< T >.
virtual bool sk::util::Collection< T >::retainAll | ( | const Collection< T > & | other | ) | [pure virtual] |
Retains only the elements in this collection that are contained in the specified collection.
Implemented in sk::util::AbstractCollection< T >, and sk::util::AbstractCollection< T >.
virtual const Object& sk::util::Object::self | ( | ) | const [virtual, inherited] |
Reimplemented in sk::util::String.
virtual Object& sk::util::Object::self | ( | ) | [virtual, inherited] |
virtual int sk::util::Collection< T >::size | ( | ) | const [pure virtual] |
Returns the number of elements in this collection.
Implemented in sk::rt::SynchronizedCollection< T >, sk::util::AbstractCollection< T >, sk::util::ArrayList< T >, sk::rt::SynchronizedCollection< T >, and 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.