DoublyLinkedList
The DoubleLinked
class provides a data structure implementing mutable doubly-linked lists. succ --> --> tail (last car) --> [e1] [e2] [e3] <-- head (lead car) pred <-- <--
Type parameters
- A
-
the type of the elements/values in the list
Attributes
- Graph
-
- Supertypes
-
trait Serializableclass AbstractIterable[A]trait Iterable[A]class AbstractIterable[A]trait Iterable[A]trait IterableFactoryDefaults[A, Iterable]trait IterableOps[A, Iterable, Iterable[A]]trait IterableOnceOps[A, Iterable, Iterable[A]]trait IterableOnce[A]class Objecttrait Matchableclass AnyShow all
Members list
Type members
Classlikes
The ListIterator
inner class supports iterating over all the elements in this list.
The ListIterator
inner class supports iterating over all the elements in this list.
Value parameters
- ns
-
the starting leaf node (defaults to tail)
Attributes
- Supertypes
-
trait Iterator[A]trait IterableOnceOps[A, Iterator, Iterator[A]]trait IterableOnce[A]class Objecttrait Matchableclass AnyShow all
The Node
inner case class wraps elements in nodes for double linkage.
The Node
inner case class wraps elements in nodes for double linkage.
Value parameters
- elem
-
the element
- pred
-
the predecessor node
- succ
-
the successor node
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass AnyShow all
The NodeIterator
inner class supports iterating over all the nodes in this list.
The NodeIterator
inner class supports iterating over all the nodes in this list.
Value parameters
- ns
-
the starting node (defaults to tail)
Attributes
- Supertypes
Value members
Concrete methods
Add the new element into the list BEFORE the given successor node sn and return the new node nn. Relink: pn <-> sn TO pn <-> nn <-> sn
Add the new element into the list BEFORE the given successor node sn and return the new node nn. Relink: pn <-> sn TO pn <-> nn <-> sn
Value parameters
- elm
-
the element to be added
- sn
-
the successor node (use tail if not given)
Attributes
Add the new element into the list AFTER the given predecessor node pn and return the new node nn. Relink: pn <-> sn TO pn <-> nn <-> sn
Add the new element into the list AFTER the given predecessor node pn and return the new node nn. Relink: pn <-> sn TO pn <-> nn <-> sn
Value parameters
- elm
-
the element to be added
- pn
-
the predecessor node (use head if not given)
Attributes
Add the first element to an empty list and return the new node nn.
Add the first element to an empty list and return the new node nn.
Value parameters
- elm
-
the element to be added
Attributes
Clear the list of all nodes (and their elements).
Clear the list of all nodes (and their elements).
Attributes
Retreive the element in node nn (e.g., the current car).
Retreive the element in node nn (e.g., the current car).
Value parameters
- nn
-
the node containing the sought element
Attributes
Return the lead/first element/node in the list (e.g, node holding the lead car).
Return the lead/first element/node in the list (e.g, node holding the lead car).
Attributes
- Definition Classes
-
IterableOps
Return whether the list is empty (head and tail are null).
Return whether the list is empty (head and tail are null).
Attributes
- Definition Classes
-
IterableOnceOps
Return an iterator for retrieving all the elements in this list.
Return an iterator for retrieving all the elements in this list.
Attributes
- See also
-
scala.collection.IterableOnce
Return the trail/last element/node in the list (e.g, node holding the trail car).
Return the trail/last element/node in the list (e.g, node holding the trail car).
Attributes
- Definition Classes
-
IterableOps
Return an iterator for retrieving all the nodes in this list.
Return an iterator for retrieving all the nodes in this list.
Attributes
- See also
-
scala.collection.IterableOnce
Remove the node nn from the linked list. Relink: pn <-> nn <-> sn TO pn <-> sn
Remove the node nn from the linked list. Relink: pn <-> nn <-> sn TO pn <-> sn
Value parameters
- nn
-
the node to remove (unlink)
Attributes
Convert this doubly linked list to a string.
Convert this doubly linked list to a string.
Attributes
- Definition Classes
-
Iterable -> Any
Inherited methods
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Definition Classes
-
IterableFactoryDefaults -> IterableOps
- Inherited from:
- IterableFactoryDefaults
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableFactoryDefaults
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Definition Classes
-
IterableOps -> IterableOnceOps
- Inherited from:
- IterableOps
Attributes
- Definition Classes
-
Iterable -> Iterable -> IterableOps
- Inherited from:
- Iterable
Attributes
- Inherited from:
- IterableOnce
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- Iterable
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableFactoryDefaults
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Definition Classes
-
IterableOps -> IterableOnceOps
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOnce
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Definition Classes
-
IterableOps -> IterableOnceOps
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOnceOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Attributes
- Inherited from:
- IterableOps
Deprecated and Inherited methods
Attributes
- Deprecated
-
[Since version 2.13.0]
Use ++ instead of ++: for collections of type Iterable - Inherited from:
- IterableOps
Attributes
- Deprecated
-
[Since version 2.13.0]
Use foldLeft instead of /: - Inherited from:
- IterableOnceOps
Attributes
- Deprecated
-
[Since version 2.13.0]
Use foldRight instead of :\\ - Inherited from:
- IterableOnceOps
Attributes
- Deprecated
-
[Since version 2.13.0]
`aggregate` is not relevant for sequential collections. Use `foldLeft(z)(seqop)` instead. - Inherited from:
- IterableOnceOps
Attributes
- Deprecated
-
[Since version 2.13.0]
Use iterableFactory instead - Inherited from:
- IterableOps
Attributes
- Deprecated
-
[Since version 2.13.0]
Use `dest ++= coll` instead - Inherited from:
- IterableOnceOps
Attributes
- Deprecated
-
[Since version 2.13.0]
Check .knownSize instead of .hasDefiniteSize for more actionable information (see scaladoc for details) - Inherited from:
- IterableOnceOps
Attributes
- Deprecated
-
[Since version 2.13.0]
Use coll instead of repr in a collection implementation, use the collection value itself from the outside - Inherited from:
- IterableOps
Attributes
- Deprecated
-
[Since version 2.13.0]
Iterable.seq always returns the iterable itself - Inherited from:
- Iterable
Attributes
- Deprecated
-
[Since version 2.13.7]
toIterable is internal and will be made protected; its name is similar to `toList` or `toSeq`, but it doesn\'t copy non-immutable collections - Inherited from:
- Iterable
Attributes
- Deprecated
-
[Since version 2.13.0]
Use .iterator instead of .toIterator - Inherited from:
- IterableOnceOps
Attributes
- Deprecated
-
[Since version 2.13.0]
Use .to(LazyList) instead of .toStream - Inherited from:
- IterableOnceOps
Attributes
- Deprecated
-
[Since version 2.13.0]
toTraversable is internal and will be made protected; its name is similar to `toList` or `toSeq`, but it doesn\'t copy non-immutable collections - Inherited from:
- IterableOps
Attributes
- Deprecated
-
[Since version 2.13.0]
Use .view.slice(from, until) instead of .view(from, until) - Inherited from:
- IterableOps