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
- Serializable
- Product
- Equals
- List
- Collection
- Iterable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
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[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
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
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
forEach(arg0: Consumer[_ >: T]): Unit
- Definition Classes
- Iterable
-
def
get(pos: Int): T
- Definition Classes
- SimpleList → List
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- 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
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
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
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]): 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]): 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
- val underlying: List[T]
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )