All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class simset.Link

java.lang.Object
   |
   +----simset.Linkage
           |
           +----simset.Link

public class Link
extends simset.Linkage
This class is used for representing items in a circular two-way list.

The list is held in a Head object. The items are represented by objects of class Link, or more usefully, subclasses of Link.

See Also:
simset.Head, simset.Linkage

Constructor Index

 o Link()

Method Index

 o follow(Linkage)
Inserts this item after a specified item.
 o into(Head)
Inserts this item as the last member of a list.
 o out()
Removes this item from the list (if any) that it is currently in.
 o precede(Linkage)
Inserts this item before a specified item.

Constructors

 o Link
 public Link()

Methods

 o out
 public final void out()
Removes this item from the list (if any) that it is currently in. If it is not currently in a list, the call has no effect.

 o follow
 public final void follow(simset.Linkage ptr)
Inserts this item after a specified item.

The item is inserted after the one referred to by the parameter, after having removed it from the list (if any) that is currently in. If the parameter refers to a Head, the effect is to put this object into first place in the list. If the parameter is null or does not belong to a list and is not a Head object, the effect is the same as out().

Parameters:
ptr - a pointer to the Linkage after which this item is to be inserted.
 o precede
 public final void precede(simset.Linkage ptr)
Inserts this item before a specified item.

The item is inserted before the one referred to by the parameter, after having removed it from the list (if any) that is currently in. If the parameter refers to a Head, the effect is to put this object into last place in the list. If the parameter is null or does not belong to a list and is not a Head object, the effect is the same as out().

Parameters:
ptr - a pointer to the Linkage after which this item is to be inserted.
 o into
 public final void into(simset.Head s)
Inserts this item as the last member of a list.

The item is inserted last in the list referred to by the parameter, after having removed it from any list that is currently in. If the parameter is null, the effect is the same as out().

Parameters:
ptr - a pointer to the list into which this item is to be inserted.

All Packages  Class Hierarchy  This Package  Previous  Next  Index