All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class collections.CLCell

java.lang.Object
   |
   +----collections.Cell
           |
           +----collections.CLCell

public class CLCell
extends Cell
CLCells are cells that are always arranged in circular lists They are pure implementation tools


Constructor Index

 o CLCell()
Make a singular cell with null contents
 o CLCell(Object)
Make a singular cell
 o CLCell(Object, CLCell, CLCell)
Make a cell with contents v, previous cell p, next cell n

Method Index

 o addNext(Object)
Make a cell holding v and link it immediately after current cell
 o addPrev(Object)
make a node holding v, link it before the current cell, and return it
 o copyList()
Make a copy of the list and return new head.
 o count(Object)
return the number of cells holding element found in a circular traversal
 o find(Object)
return the first cell holding element found in a circular traversal starting at current cell, or null if no such
 o isSingleton()
Return true if current cell is the only one on the list
 o length()
return the number of cells in the list
 o linkNext(CLCell)
 o linkPrev(CLCell)
link p before current cell
 o next()
return next cell
 o next(CLCell)
Set next cell.
 o nth(int)
return the nth cell traversed from here.
 o prev()
return previous cell
 o prev(CLCell)
Set previous cell.
 o unlink()
Unlink self from list it is in.
 o unlinkNext()
Unlink the next cell.
 o unlinkPrev()
Unlink the previous cell.

Constructors

 o CLCell
 public CLCell(Object v,
               CLCell p,
               CLCell n)
Make a cell with contents v, previous cell p, next cell n

 o CLCell
 public CLCell(Object v)
Make a singular cell

 o CLCell
 public CLCell()
Make a singular cell with null contents

Methods

 o next
 public final CLCell next()
return next cell

 o next
 public final void next(CLCell n)
Set next cell. You probably don't want to call this

 o prev
 public final CLCell prev()
return previous cell

 o prev
 public final void prev(CLCell n)
Set previous cell. You probably don't want to call this

 o isSingleton
 public boolean isSingleton()
Return true if current cell is the only one on the list

 o linkNext
 public final void linkNext(CLCell p)
 o addNext
 public final void addNext(Object v)
Make a cell holding v and link it immediately after current cell

 o addPrev
 public final CLCell addPrev(Object v)
make a node holding v, link it before the current cell, and return it

 o linkPrev
 public final void linkPrev(CLCell p)
link p before current cell

 o length
 public final int length()
return the number of cells in the list

 o find
 public final CLCell find(Object element)
return the first cell holding element found in a circular traversal starting at current cell, or null if no such

 o count
 public final int count(Object element)
return the number of cells holding element found in a circular traversal

 o nth
 public final CLCell nth(int n)
return the nth cell traversed from here. It may wrap around.

 o unlinkNext
 public final void unlinkNext()
Unlink the next cell. This has no effect on the list if isSingleton()

 o unlinkPrev
 public final void unlinkPrev()
Unlink the previous cell. This has no effect on the list if isSingleton()

 o unlink
 public final void unlink()
Unlink self from list it is in. Causes it to be a singleton

 o copyList
 public CLCell copyList()
Make a copy of the list and return new head.


All Packages  Class Hierarchy  This Package  Previous  Next  Index