final case class SimpleList[T](underlying: List[T]) extends List[T] with Product with Serializable
An immutable singly linked list that uses the Scala List class as backing
store, but is Java-friendly as a java.util.List
. Note however that since it
is immutable, you have to capture the results of addition/removal operations.
The typical mutating methods like add
, set
, clear
, and remove
are all
unsupported, as are mutating methods on its iterators, since this collection
is immutable.
- Alphabetic
- By Inheritance
- SimpleList
- Serializable
- Product
- Equals
- List
- Collection
- Iterable
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def add(after: Int, x: T): Unit
- Definition Classes
- SimpleList → List
- def add(x: T): Boolean
- Definition Classes
- SimpleList → List → Collection
- def addAll(index: Int, jc: Collection[_ <: T]): Boolean
- Definition Classes
- SimpleList → List
- def addAll(jc: Collection[_ <: T]): Boolean
- Definition Classes
- SimpleList → List → Collection
- def append(item: T): SimpleList[T]
Append an item to this list.
Append an item to this list. This operation is O(n) where
n
is the number of items in the underlyingList
, and returns the updated list. - final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clear(): Unit
- Definition Classes
- SimpleList → List → Collection
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def contains(obj: AnyRef): Boolean
Returns true if this list contains the given
obj
.Returns true if this list contains the given
obj
.- Definition Classes
- SimpleList → List → Collection
- def containsAll(jc: Collection[_]): Boolean
- Definition Classes
- SimpleList → List → Collection
- def drop(n: Int): SimpleList[T]
- def dropRight(n: Int): SimpleList[T]
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def forEach(arg0: Consumer[_ >: T <: AnyRef]): Unit
- Definition Classes
- Iterable
- def get(pos: Int): T
- Definition Classes
- SimpleList → List
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def head(): T
- def headOption(): Option[T]
- def indexOf(obj: AnyRef): Int
- Definition Classes
- SimpleList → List
- def isEmpty(): Boolean
- Definition Classes
- SimpleList → List → Collection
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def iterator(): Iterator[T]
- Definition Classes
- SimpleList → List → Collection → Iterable
- def lastIndexOf(obj: AnyRef): Int
- Definition Classes
- SimpleList → List
- def listIterator(pos: Int): ListIterator[T]
- Definition Classes
- SimpleList → List
- def listIterator(): ListIterator[T]
- Definition Classes
- SimpleList → List
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def parallelStream(): Stream[T]
- Definition Classes
- Collection
- def prepend(item: T): SimpleList[T]
Prepends an item to this list.
Prepends an item to this list. This operation is O(1) and returns the updated list.
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- def remove(obj: AnyRef): Boolean
- Definition Classes
- SimpleList → List → Collection
- def remove(pos: Int): T
- Definition Classes
- SimpleList → List
- def removeAll(jc: Collection[_]): Boolean
- Definition Classes
- SimpleList → List → Collection
- def removeIf(arg0: Predicate[_ >: T <: AnyRef]): Boolean
- Definition Classes
- Collection
- def replaceAll(arg0: UnaryOperator[T]): Unit
- Definition Classes
- List
- def retainAll(jc: Collection[_]): Boolean
- Definition Classes
- SimpleList → List → Collection
- def reverse(): SimpleList[T]
- def set(after: Int, x: T): T
- Definition Classes
- SimpleList → List
- def size(): Int
- Definition Classes
- SimpleList → List → Collection
- def sort(arg0: Comparator[_ >: T <: AnyRef]): Unit
- Definition Classes
- List
- def spliterator(): Spliterator[T]
- Definition Classes
- List → Collection → Iterable
- def stream(): Stream[T]
- Definition Classes
- Collection
- def subList(from: Int, to: Int): List[T]
- Definition Classes
- SimpleList → List
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def tail(): SimpleList[T]
- def take(n: Int): SimpleList[T]
- def takeRight(n: Int): SimpleList[T]
- def toArray[X](in: Array[X]): Array[X]
- Definition Classes
- SimpleList → List → Collection
- def toArray(): Array[AnyRef]
- Definition Classes
- SimpleList → List → Collection
- def toArray[T <: AnyRef](arg0: IntFunction[Array[T]]): Array[T]
- Definition Classes
- Collection
- val underlying: List[T]
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])