Jive reference manual
|
#include <jem/util/ObjectHashMap.h>
Public Member Functions | |
ObjectHashMap () | |
virtual void | readFrom (io::ObjectInput &in) |
virtual void | writeTo (io::ObjectOutput &out) const |
virtual Ref< Object > | clone () const |
virtual Ref< MapEnum > | getMapEnum () const |
virtual Ref< Object > | get (const Ref< Object > &key) const |
virtual bool | find (Ref< Object > &value, const Ref< Object > &key) const |
virtual void | insert (const Ref< Object > &key, const Ref< Object > &value) |
virtual void | erase (const Ref< Object > &key) |
virtual void | clear () |
Deletes all objects from this collection. More... | |
virtual void | reserve (idx_t count) |
virtual void | trimToSize () |
Deallocates non-used memory. More... | |
virtual idx_t | capacity () const |
Returns the capacity of this collection. More... | |
virtual idx_t | size () const |
Returns the number of objects in this collection. More... | |
![]() | |
Ref< MapEnum > | enumerate () const |
virtual Ref< Enumerator > | getEnumerator () const |
Returns an enumerator over this collection. More... | |
virtual bool | contains (const Ref< Object > &key) const |
virtual bool | add (const Ref< Object > &obj) |
Adds an object to this collection. More... | |
![]() | |
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 | reserve (int n) |
Pre-allocates data structures for storing additional objects. More... | |
![]() | |
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 | ~ObjectHashMap () |
![]() | |
virtual | ~ObjectMap () |
void | clone_ (const ObjectMap &rhs) |
void | readFrom_ (io::ObjectInput &in) |
void | writeTo_ (io::ObjectOutput &out) const |
![]() | |
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... | |
![]() | |
Collectable () | |
Creates an empty Collectable . More... | |
~Collectable () | |
Frees resources. More... | |
![]() | |
virtual | ~Enumerable () |
![]() | |
virtual | ~Interface () |
Empty destructor. More... | |
![]() | |
virtual | ~Clonable () |
virtual void | emitVTable_ () |
![]() | |
virtual | ~Serializable () |
virtual void | emitVtableFunc_ () |
Friends | |
class | Enumerator_ |
Additional Inherited Members | |
![]() | |
static Class * | makeClass () |
static Class * | getType () |
![]() | |
static Class * | getType () |
Returns the Class instance representing the Object class. More... | |
jem::util::ObjectHashMap::ObjectHashMap | ( | ) |
|
protectedvirtual |
|
virtual |
Implements jem::io::Serializable.
|
virtual |
Implements jem::io::Serializable.
Implements jem::Clonable.
Implements jem::util::ObjectMap.
Reimplemented from jem::util::ObjectMap.
|
virtual |
Implements jem::util::ObjectMap.
|
virtual |
Implements jem::util::ObjectMap.
Implements jem::util::ObjectMap.
|
virtual |
Deletes all objects from this collection.
This function may not be called if an enumerator points to this collection.
this->size() == 0
Implements jem::util::ObjectCollection.
|
virtual |
|
virtual |
Notifies this collection that it should deallocate non-used memory. Call this function after you have added all objects to this collection.
For efficiency reasons, an ObjectCollection
may allocate extra memory each time that an object is added and no more free space is left in its internal data structures. This means that the ObjectCollection
may use more memory than is actually needed to store all objects. This member function informs the ObjectCollection
that no more new objects will be added and that it should shrink its data structures as much as possible.
This function may not be called if an enumerator points to this collection.
reserve()
, capacity()
Reimplemented from jem::util::ObjectCollection.
|
virtual |
Returns the number of objects that this collection can contain without having to expand its internal data structures. This number is called the capacity of this collection.
The implementation of this function provided by the ObjectCollection
class simply returns size()
.
Reimplemented from jem::util::ObjectCollection.
|
virtual |
Returns the number of objects in this collection.
Implements jem::util::ObjectCollection.
|
friend |