- class CLCell(T) : Cell!(T) ¶#
-
CLCells are cells that are always arranged in circular lists
They are pure implementation tools
Doug Lea
@version 0.93
For an introduction to this package see Overview .
- this(T v, CLCell p, CLCell n) [public] ¶#
-
Make a cell with contents v, previous cell p, next cell n
- this(T v) [public] ¶#
-
Make a singular cell
- this() [public] ¶#
-
Make a singular cell with null contents
- CLCell next() [public, final] ¶#
-
return next cell
- void next(CLCell n) [public, final] ¶#
-
Set next cell. You probably don't want to call this
- CLCell prev() [public, final] ¶#
-
return previous cell
- void prev(CLCell n) [public, final] ¶#
-
Set previous cell. You probably don't want to call this
- bool isSingleton() [public, final] ¶#
-
Return true if current cell is the only one on the list
- void addNext(T v) [public, final] ¶#
-
Make a cell holding v and link it immediately after current cell
- CLCell addPrev(T v) [public, final] ¶#
-
make a node holding v, link it before the current cell, and return it
- void linkPrev(CLCell p) [public, final] ¶#
-
link p before current cell
- int _length() [public, final] ¶#
-
return the number of cells in the list
- CLCell find(T element) [public, final] ¶#
-
return the first cell holding element found in a circular traversal starting
at current cell, or null if no such
- int count(T element) [public, final] ¶#
-
return the number of cells holding element found in a circular
traversal
- CLCell nth(int n) [public, final] ¶#
-
return the nth cell traversed from here. It may wrap around.
- void unlinkNext() [public, final] ¶#
-
Unlink the next cell.
This has no effect on the list if isSingleton()
- void unlinkPrev() [public, final] ¶#
-
Unlink the previous cell.
This has no effect on the list if isSingleton()
- void unlink() [public, final] ¶#
-
Unlink self from list it is in.
Causes it to be a singleton
- CLCell copyList() [public, final] ¶#
-
Make a copy of the list and return new head.