Back: LargeZeroInteger-printing
Up: Class reference
Forward: Link class-instance creation
 
Top: GNU Smalltalk User's Guide
Contents: Table of Contents
Index: Class index
About: About this document

6.87 Link

Defined in namespace Smalltalk
Category: Collections-Sequenceable
I represent simple linked lists. Generally, I am not used by myself, but rather a subclass adds other instance variables that hold the information for each node, and I hold the glue that keeps them together.

6.87.1 Link class: instance creation  (class)
6.87.2 Link: basic  (instance)
6.87.3 Link: iteration  (instance)


6.87.1 Link class: instance creation

nextLink: aLink
Create an instance with the given next link


6.87.2 Link: basic

nextLink
Answer the next item in the list

nextLink: aLink
Set the next item in the list


6.87.3 Link: iteration

at: index
Retrieve a node (instance of Link) that is at a distance of `index' after the receiver.

at: index put: object
This method should not be called for instances of this class.

do: aBlock
Evaluate aBlock for each element in the list

size
Answer the number of elements in the list. Warning: this is O(n)




This document was generated on May, 12 2002 using texi2html