8.8. File tom/BucketPDictElement

class tom.BucketPointerDictElement

inherits

State supers: BucketElement

instance tom.BucketPointerDictElement

variables

public pointer key;

This bucket element's key.

public Any value;

The value in this bucket element.

methods


id
  initWith (pointer, All) (k, v);

Designated initializer.


Any
  member pointer k;

Return the value associated with the key k, asking the next element if this element does not match.

The implementation by BucketDictElement, considers its key and returns its value.


int
  add (pointer, All) (k, v);

Add the (k, v) pair to this bucket, if the key is not already present. Return the number by which this bucket's length has increased.


(id, int)
  gc_mark_values;

Starting with this bucket element, remove the objects of which the value is gc_dead. Return the replacement for this element, and the number of bucket elements that were removed from this bucket list.


int (code)
  rehash;

Rehash the pointer key.


int (code)
  rehashq;

Rehash the pointer key.


(id, int)
  remove pointer k;

Remove the object with the key k. Return the replacement for this element, and the number of bucket elements that were removed from this bucket list (max 1).