8.7. File tom/BucketIntDictElement

class tom.BucketIntDictElement

inherits

State supers: BucketElement

instance tom.BucketIntDictElement

variables

public int key;

This bucket element's key.

public Any value;

The value in this bucket element.

methods


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

Designated initializer.


Any
  member int k;

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

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


Any
  memq int k;

Undocumented.


int
  add (int, 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.


int
  addq (int, 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.


int
  rehash;

Return the integer key.


int
  rehashq;

Return the integer key.


(id, int)
  remove int 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).


(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.