Construct an empty vector.
Append an item to this vector.
Append an item to this vector. This operation is effectively O(1) and returns the updated vector.
Returns true if this vector contains the given obj.
Returns true if this vector contains the given obj.
Prepends an item to this vector.
Prepends an item to this vector. This operation is effectively O(1) and returns the updated vector.
An immutable vector that uses the Scala
Vectorclass as backing store, but is Java-friendly as ajava.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, andremoveare all unsupported, as are mutating methods on its iterators, since this collection is immutable."Scala's Collection Library overview" section on Vectors for more information.