|
| Vector (int initSize, bool ownerOfObjects) |
|
| ~Vector () |
|
int | size () |
|
void | put (object::Object *newElement, int newPos=-1) |
|
void | insert (object::Object *newElement, int pos) |
|
int | insertSorted (object::Object *newElement, object::Comparator *comparator=&object::standardComparator) |
| Insert into an already sorted vector. More...
|
|
void | remove (int pos) |
|
object::Object * | get (int pos) const |
|
void | clear () |
|
void | sort (object::Comparator *comparator=&object::standardComparator) |
|
int | bsearch (Object *key, bool mustExist, int start, int end, object::Comparator *comparator=&object::standardComparator) |
| Use binary search to find an element in a sorted vector. More...
|
|
int | bsearch (Object *key, bool mustExist, object::Comparator *comparator=&object::standardComparator) |
|
void | intoStringBuffer (misc::StringBuffer *sb) |
| Store a textual representation of the object in a misc::StringBuffer. More...
|
|
Iterator | iterator () |
|
virtual | ~Object () |
| The destructor is defined as virtual (but not abstract), so that destruction of Object's works properly. More...
|
|
virtual bool | equals (Object *other) |
| Returns, whether two objects are equal. More...
|
|
virtual int | hashValue () |
| Return a hash value for the object. More...
|
|
virtual Object * | clone () |
| Return an exact copy of the object. More...
|
|
const char * | toString () |
| Use object::Object::intoStringBuffer to return a textual representation of the object. More...
|
|
virtual size_t | sizeOf () |
| Return the number of bytes, this object totally uses. More...
|
|
Container, which is implemented by an array, which is dynamically resized.
Use binary search to find an element in a sorted vector.
If "mustExist" is true, only exact matches are found; otherwise, -1 is returned. If it is false, the position of the next greater element is returned, or, if the key is the greatest element, the size of the array. (This is the value which can be used for insertion; see insertSortet()).
References lout::object::Comparator::compare(), DBG_OBJ_MSG, DBG_OBJ_MSG_END, DBG_OBJ_MSG_START, and DBG_OBJ_MSGF.
Referenced by bsearch(), and insertSorted().