Jive reference manual
|
#include <jem/util/ObjectMap.h>
Public Member Functions | |
Ref< MapEnum > | enumerate () const |
virtual Ref< Enumerator > | getEnumerator () const |
Returns an enumerator over this collection. More... | |
virtual Ref< MapEnum > | getMapEnum () const =0 |
virtual bool | contains (const Ref< Object > &key) const |
virtual Ref< Object > | get (const Ref< Object > &key) const |
virtual bool | find (Ref< Object > &value, const Ref< Object > &key) const =0 |
virtual void | insert (const Ref< Object > &key, const Ref< Object > &value)=0 |
virtual void | erase (const Ref< Object > &key)=0 |
virtual bool | add (const Ref< Object > &obj) |
Adds an object to this collection. More... | |
Public Member Functions inherited from jem::util::ObjectCollection | |
virtual Class * | getClass () const |
Returns the Class instance representing the runtime class of this object. More... | |
Ref< Enumerator > | enumerate () const |
Returns an enumerator over this collection. More... | |
virtual void | clear ()=0 |
Deletes all objects from this collection. More... | |
virtual void | reserve (int n) |
Pre-allocates data structures for storing additional objects. More... | |
virtual void | trimToSize () |
Deallocates non-used memory. More... | |
virtual int | capacity () const |
Returns the capacity of this collection. More... | |
virtual int | size () const =0 |
Returns the number of objects in this collection. More... | |
Public Member Functions inherited from jem::Object | |
virtual String | toString () const |
Returns a short textual description of this object. More... | |
virtual long | hashValue () const |
Returns a hash value for this object. More... | |
virtual bool | equals (const Ref< Object > &obj) const |
Tests whether two objects are equal. More... | |
Ref< Object > | clone () const |
Returns a copy of this object. More... | |
Protected Member Functions | |
virtual | ~ObjectMap () |
void | clone_ (const ObjectMap &rhs) |
void | readFrom_ (io::ObjectInput &in) |
void | writeTo_ (io::ObjectOutput &out) const |
Protected Member Functions inherited from jem::util::ObjectCollection | |
virtual | ~ObjectCollection () |
void | clone_ (const ObjectCollection &rhs) |
Makes a deep copy of another collection. More... | |
void | readFrom_ (io::ObjectInput &in) |
Reads the contents of this collection from an object input stream. More... | |
void | writeTo_ (io::ObjectOutput &out) const |
Writes the contents of this collection to an object output stream. More... | |
Protected Member Functions inherited from jem::Collectable | |
Collectable () | |
Creates an empty Collectable . More... | |
~Collectable () | |
Frees resources. More... | |
Protected Member Functions inherited from jem::util::Enumerable | |
virtual | ~Enumerable () |
Protected Member Functions inherited from jem::Interface | |
virtual | ~Interface () |
Empty destructor. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from jem::util::ObjectCollection | |
static Class * | makeClass () |
static Class * | getType () |
Static Public Member Functions inherited from jem::Object | |
static Class * | getType () |
Returns the Class instance representing the Object class. More... | |
|
protectedvirtual |
|
virtual |
Returns an Enumerator
that can be used to iterate over all objects in this collection. This object collection may not be structurally modified as long as one or more enumerators are pointing to it.
Implements jem::util::ObjectCollection.
Implemented in jem::util::ObjectHashMap, and jem::util::WeakHashMap.
Reimplemented in jem::util::ObjectHashMap, and jem::util::WeakHashMap.
|
pure virtual |
Implemented in jem::util::ObjectHashMap, and jem::util::WeakHashMap.
|
pure virtual |
Implemented in jem::util::ObjectHashMap, and jem::util::WeakHashMap.
Implemented in jem::util::ObjectHashMap, and jem::util::WeakHashMap.
Requests that the object obj is added to this collection. This function returns true
if the object has been added, and false
otherwise. An implementation of this function does not have to add the object if it is already present in this collection and if all objects in this collection should be unique.
This function may not be called if an enumerator points to this collection.
obj | - the object to be added. |
true
if the object has been added to this collection, and false
otherwise. Implements jem::util::ObjectCollection.
|
protected |
|
protected |
|
protected |