Squeak Class Documentation category index | class index  
 
WeakSet
  category: Collections-Weak
  superclass: Set
  subclasses:

No comment. Sorry.

instance methods
  private
  fixCollisionsFrom:
grow
growTo:
init:
rehash
scanFor:

  public
  add:
do:
do:after:
includes:
like:
printElementsOn:
remove:ifAbsent:
size
slowSize

class methods
  no messages
 

instance methods
  private top  
 

fixCollisionsFrom:

The element at index has been removed and replaced by nil.
This method moves forward from there, relocating any entries
that had been placed below due to collisions with this one


 

grow

Grow the elements array and reinsert the old elements


 

growTo:

Grow the elements array and reinsert the old elements


 

init:

Initialize array to an array size of n


 

rehash

Do nothing. Here so sending this to a Set does not have to do a time consuming respondsTo:


 

scanFor:

Scan the key array for the first slot containing either a nil (indicating an empty slot) or an element that matches anObject. Answer the index of that slot or zero if no slot is found. This method will be overridden in various subclasses that have different interpretations for matching elements


  public top  
 

add:

Include newObject as one of the receiver's elements, but only if
not already present. Answer newObject


 

do:

Evaluate aBlock with each of the receiver's elements as the argument.


 

do:after:


 

includes:

Answer whether anObject is one of the receiver's elements.


 

like:

Answer an object in the receiver that is equal to anObject,
nil if no such object is found. Relies heavily on hash properties


 

printElementsOn:


 

remove:ifAbsent:

Remove oldObject from the receiver's elements. If several of the
elements are equal to oldObject, only one is removed. If no element is
equal to oldObject, answer the result of evaluating anExceptionBlock.
Otherwise, answer the argument, oldObject. ArrayedCollections cannot
respond to this message.


 

size

Careful! Answer the maximum amount
of elements in the receiver, not the
exact amount


 

slowSize

Careful! Answer the maximum amount
of elements in the receiver, not the
exact amount


class methods
  no messages top