final case class SimpleVector[T](underlying: Vector[T]) extends List[T] with Product with Serializable
An immutable vector that uses the Scala Vector
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.
- See also
"Scala's Collection Library overview" section on Vectors for more information.
- Alphabetic
- By Inheritance
- SimpleVector
- 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
- SimpleVector → List
-
def
add(x: T): Boolean
- Definition Classes
- SimpleVector → List → Collection
-
def
addAll(index: Int, jc: Collection[_ <: T]): Boolean
- Definition Classes
- SimpleVector → List
-
def
addAll(jc: Collection[_ <: T]): Boolean
- Definition Classes
- SimpleVector → List → Collection
-
def
append(item: T): SimpleVector[T]
Append an item to this vector.
Append an item to this vector. This operation is effectively O(1) and returns the updated vector.
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clear(): Unit
- Definition Classes
- SimpleVector → List → Collection
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
contains(obj: AnyRef): Boolean
Returns
true
if this vector contains the givenobj
.Returns
true
if this vector contains the givenobj
.- Definition Classes
- SimpleVector → List → Collection
-
def
containsAll(jc: Collection[_]): Boolean
- Definition Classes
- SimpleVector → List → Collection
- def drop(n: Int): SimpleVector[T]
- def dropRight(n: Int): SimpleVector[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
- SimpleVector → List
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- def head(): T
- def headOption(): Option[T]
-
def
indexOf(obj: AnyRef): Int
- Definition Classes
- SimpleVector → List
-
def
isEmpty(): Boolean
- Definition Classes
- SimpleVector → List → Collection
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
iterator(): Iterator[T]
- Definition Classes
- SimpleVector → List → Collection → Iterable
-
def
lastIndexOf(obj: AnyRef): Int
- Definition Classes
- SimpleVector → List
-
def
listIterator(pos: Int): ListIterator[T]
- Definition Classes
- SimpleVector → List
-
def
listIterator(): ListIterator[T]
- Definition Classes
- SimpleVector → 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): SimpleVector[T]
Prepends an item to this vector.
Prepends an item to this vector. This operation is effectively O(1) and returns the updated vector.
-
def
remove(obj: AnyRef): Boolean
- Definition Classes
- SimpleVector → List → Collection
-
def
remove(pos: Int): T
- Definition Classes
- SimpleVector → List
-
def
removeAll(jc: Collection[_]): Boolean
- Definition Classes
- SimpleVector → 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
- SimpleVector → List → Collection
- def reverse(): SimpleVector[T]
-
def
set(after: Int, x: T): T
- Definition Classes
- SimpleVector → List
-
def
size(): Int
- Definition Classes
- SimpleVector → 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
- SimpleVector → List
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- def tail(): SimpleVector[T]
- def take(n: Int): SimpleVector[T]
- def takeRight(n: Int): SimpleVector[T]
-
def
toArray[X](in: Array[X]): Array[X]
- Definition Classes
- SimpleVector → List → Collection
-
def
toArray(): Array[AnyRef]
- Definition Classes
- SimpleVector → List → Collection
- val underlying: Vector[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( ... )