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
-
CLCell()
- Make a singular cell with null contents
-
CLCell(Object)
- Make a singular cell
-
CLCell(Object, CLCell, CLCell)
- Make a cell with contents v, previous cell p, next cell n
-
addNext(Object)
- Make a cell holding v and link it immediately after current cell
-
addPrev(Object)
- make a node holding v, link it before the current cell, and return it
-
copyList()
- Make a copy of the list and return new head.
-
count(Object)
- return the number of cells holding element found in a circular
traversal
-
find(Object)
- return the first cell holding element found in a circular traversal starting
at current cell, or null if no such
-
isSingleton()
- Return true if current cell is the only one on the list
-
length()
- return the number of cells in the list
-
linkNext(CLCell)
-
-
linkPrev(CLCell)
- link p before current cell
-
next()
- return next cell
-
next(CLCell)
- Set next cell.
-
nth(int)
- return the nth cell traversed from here.
-
prev()
- return previous cell
-
prev(CLCell)
- Set previous cell.
-
unlink()
- Unlink self from list it is in.
-
unlinkNext()
-
Unlink the next cell.
-
unlinkPrev()
-
Unlink the previous cell.
CLCell
public CLCell(Object v,
CLCell p,
CLCell n)
- Make a cell with contents v, previous cell p, next cell n
CLCell
public CLCell(Object v)
- Make a singular cell
CLCell
public CLCell()
- Make a singular cell with null contents
next
public final CLCell next()
- return next cell
next
public final void next(CLCell n)
- Set next cell. You probably don't want to call this
prev
public final CLCell prev()
- return previous cell
prev
public final void prev(CLCell n)
- Set previous cell. You probably don't want to call this
isSingleton
public boolean isSingleton()
- Return true if current cell is the only one on the list
linkNext
public final void linkNext(CLCell p)
addNext
public final void addNext(Object v)
- Make a cell holding v and link it immediately after current cell
addPrev
public final CLCell addPrev(Object v)
- make a node holding v, link it before the current cell, and return it
linkPrev
public final void linkPrev(CLCell p)
- link p before current cell
length
public final int length()
- return the number of cells in the list
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
count
public final int count(Object element)
- return the number of cells holding element found in a circular
traversal
nth
public final CLCell nth(int n)
- return the nth cell traversed from here. It may wrap around.
unlinkNext
public final void unlinkNext()
- Unlink the next cell.
This has no effect on the list if isSingleton()
unlinkPrev
public final void unlinkPrev()
- Unlink the previous cell.
This has no effect on the list if isSingleton()
unlink
public final void unlink()
- Unlink self from list it is in.
Causes it to be a singleton
copyList
public CLCell copyList()
- Make a copy of the list and return new head.
All Packages Class Hierarchy This Package Previous Next Index