scala.$colon$colon

class ::

case final class ::[B](private hd : B, val tl : List[B])

 extends List[B]


A non empty list characterized by a head and a tail.
author
- Martin Odersky
version
- 1.0, 15/07/2003


Companion: ::

Source: List.scala(1369)

 Constructors

def this(hd : B, tl : List[B])

 Fields

elements override def elements
Returns the elements in the list as an iterator [details]
return
- an iterator on the list elements.
Iterator[A] List
first def first
Returns the first element of this list [details]
return
- the first element of the list.
throws
Predef.UnsupportedOperationException - if the list is empty.
A Seq
firstOption def firstOption
Returns as an option the first element of this list or None if list is empty [details]
return
- the first element as an option.
Option[A] Seq
hasDefiniteSize def hasDefiniteSize
returns true iff this collection has a bound size [details]
Many APIs in this trait will not work on collections of unbound sizes.
Boolean Iterable
head def head
Returns this first element of the list [details]
return
- the first element of this list.
throws
Predef.NoSuchElementException - if the list is empty.
B
headOption def headOption Option[A] Seq
indices def indices
Creates a list with all indices in the list [details]
This is equivalent to a call to List.range(0, xs.length).
return
- a list of all indices in the list.
List[Int] List
init def init
Returns the list without its last element [details]
return
- the list without its last element.
throws
Predef.UnsupportedOperationException - if the list is empty.
List[A] List
isEmpty override def isEmpty
Returns true if the list does not contain any elements [details]
return
- true, iff the list is empty.
Boolean
last override def last
Returns the last element of this list [details]
return
- the last element of the list.
throws
Predef.NoSuchElementException - if the list is empty.
A List
lastOption def lastOption
Returns as an option the last element of this list or None if list is empty [details]
return
- the last element as an option.
Option[A] Seq
length def length
Returns the number of elements in the list [details]
return
- the number of elements in the list.
Int List
mkString def mkString
Converts a collection into a flat String by each element's toString method [details]
note
- Will not terminate for infinite-sized collections.
String Iterable
productArity override def productArity
return k for a product A(x_1, [details]
..,x_k)
Int
productPrefix override def productPrefix
By default the empty string [details]
Implementations may override this method in order to prepend a string prefix to the result of the toString methods.
String
projection override def projection
returns a projection that can be used to call non-strict filter, map, and flatMap methods that build projections of the collection
Stream[A] List
removeDuplicates def removeDuplicates
Removes redundant elements from the list [details]
Uses the method == to decide if two elements are identical.
return
- the list without doubles.
List[A] List
reverse override def reverse
A list consisting of all elements of this list in reverse order
List[A] List
size def size
should always be length
Int Seq
stringPrefix protected override def stringPrefix
Defines the prefix of this object's toString representation
String List
tail def tail
Returns this list without its first element [details]
return
- this list without its first element.
throws
Predef.NoSuchElementException - if the list is empty.
List[B]
toList override def toList
Overrides the method in Iterable for efficiency [details]
return
- the list itself
List[A] List
toSeq override def toSeq
Overridden for efficiency [details]
return
- the sequence itself
Seq[A] Seq
toStream override def toStream
Returns a stream containing all of the elements in this iterable object [details]
note
- consider using projection for lazy behavior.
Stream[A] List

 Methods

!= final def !=(arg0 : Object) Boolean AnyRef
!= final def !=(arg0 : Any)
o != arg0 is the same as !(o == (arg0)) [details]

param
arg0 - the object to compare against this object for dis-equality.
return
- false if the receiver object is equivalent to the argument; true otherwise.

Boolean Any
+ def +[B >: A](x : B)

Add an element x at the end of this list.

[details]
deprecated
- Replace uses of l + e with l ::: List(e).
param
x - the element to append.
return
- the list with x added at the end.
List[B] List
++ override def ++[B >: A](that : Iterable[B])
Appends two list objects
List[B] List
- def -[B >: A](x : B)
Computes the difference between this list and the given object x [details]
param
x - the object to remove from this list.
return
- this list without the elements of the given object x.
List[B] List
-- def --[B >: A](that : List[B])
Computes the difference between this list and the given list that [details]
param
that - the list of elements to remove from this list.
return
- this list without the elements of the given list that.
List[B] List
/: def /:[B](z : B)(op : (B, A) => B)
Similar to foldLeft but can be used as an operator with the order of list and zero arguments reversed [details]
That is, z /: xs is the same as xs foldLeft z
note
- Will not terminate for infinite-sized collections.
B Iterable
:: def ::[B >: A](x : B)

Add an element x at the beginning of this list.

[details]
ex
- 1 :: List(2, 3) = List(2, 3).::(1) = List(1, 2, 3)
param
x - the element to prepend.
return
- the list with x added at the beginning.
List[B] List
::: def :::[B >: A](prefix : List[B])

Returns a list resulting from the concatenation of the given list prefix and this list.

[details]
ex
- List(1, 2) ::: List(3, 4) = List(3, 4).:::(List(1, 2)) = List(1, 2, 3, 4)
param
prefix - the list to concatenate at the beginning of this list.
return
- the concatenation of the two lists.
List[B] List
:\ def :\[B](z : B)(op : (A, B) => B)
An alias for foldRight [details]
That is, xs :\ z is the same as xs foldRight z
note
- Will not terminate for infinite-sized collections.
B Iterable
== final def ==(arg0 : Any)
o == arg0 is the same as o [details]
equals(arg0).

param
arg0 - the object to compare against this object for equality.
return
- true if the receiver object is equivalent to the argument; false otherwise.

Boolean Any
== final def ==(arg0 : Object)
o == arg0 is the same as if (o eq null) arg0 eq null else o [details]
equals(arg0).

param
arg0 - the object to compare against this object for equality.
return
- true if the receiver object is equivalent to the argument; false otherwise.

Boolean AnyRef
addString def addString(buf : StringBuilder, start : String, sep : String, end : String)
Write all elements of this string into given string builder [details]
note
- Will not terminate for infinite-sized collections.
param
sep - separator string.
buf - the StringBuilder to which elements are appended
start - starting string.
end - ending string.
return
- the buf StringBuilder object
StringBuilder Iterable
addString def addString(buf : StringBuilder)
Write all elements of this string into given string builder, with no separator string between elements [details]
note
- Will not terminate for infinite-sized collections.
param
buf - the StringBuilder to which elements are appended
return
- the buf StringBuilder object
StringBuilder Iterable
addString def addString(buf : StringBuilder, sep : String)
Write all elements of this string into given string builder [details]
note
- Will not terminate for infinite-sized collections.
param
buf - the StringBuilder to which elements are appended
sep - separator string.
return
- the buf StringBuilder object
StringBuilder Iterable
andThen override def andThen[C](k : (B) => C)
(f andThen g)(x) == g(f(x))
PartialFunction[A, C] PartialFunction
apply def apply(n : Int)
Returns the n-th element of this list [details]
The first element (head of the list) is at position 0.
param
n - index of the element to return
return
- the element at position n in this list.
throws
Predef.NoSuchElementException - if the list is too short.
A List
asInstanceOf final def asInstanceOf[T0]
This method is used to cast the receiver object to be of type T0 [details]

Note that the success of a cast at runtime is modulo Scala's erasure semantics. Therefore the expression 1.asInstanceOf[String] will throw a ClassCastException at runtime, while the expression List(1).asInstanceOf[List[String]] will not. In the latter example, because the type argument is erased as part of compilation it is not possible to check whether the contents of the list are of the requested typed.

return
- the receiver object.

throws
ClassCastException - if the receiver object is not an instance of erasure of type T0.
T0 Any
break def break(p : (A) => Boolean)
Like span but with the predicate inverted
(List[A], List[A]) List
clone protected def clone
This method creates and returns a copy of the receiver object [details]

The default implementation of the clone method is platform dependent.

return
- a copy of the receiver object.

Object AnyRef
compose def compose[A](g : (A) => T1)
(f compose g)(x) == f(g(x))
(A) => R Function1
concat override def concat[B >: A](that : Iterable[B])
Appends two iterable objects [details]
deprecated
- use ++ instead
return
- the new iterable object
Seq[B] Seq
contains def contains(elem : Any)
Tests if the given value elem is a member of this sequence [details]
param
elem - element whose membership has to be tested.
return
- true iff there is an element of this sequence which is equal (w.r.t. ==) to elem.
Boolean Seq
containsSlice def containsSlice[B](that : Seq[B])
Is that a slice in this?
Boolean Seq
copyToArray def copyToArray[B >: A](xs : Array[B], start : Int)
Fills the given array xs with the elements of this sequence starting at position start [details]
note
- Will not terminate for infinite-sized collections.
param
xs - the array to fill.
start - starting index.
pre
- the array must be large enough to hold all elements.
Unit Iterable
copyToBuffer def copyToBuffer[B >: A](dest : Buffer[B])
Copy all elements to a given buffer [details]
note
- Will not terminate if not finite.
- Will not terminate for infinite-sized collections.
param
dest - The buffer to which elements are copied
Unit Iterable
count def count(p : (A) => Boolean)
Count the number of elements in the list which satisfy a predicate [details]
param
p - the predicate for which to count
return
- the number of elements satisfying the predicate p.
Int List
diff def diff[B >: A](that : List[B])
Computes the difference between this list and the given list that [details]
deprecated
- use -- instead
param
that - the list of elements to remove from this list.
return
- this list without the elements of the given list that.
List[B] List
drop override def drop(n : Int)
Returns the list without its n first elements [details]
If this list has less than n elements, the empty list is returned.
param
n - the number of elements to drop.
return
- the list without its n first elements.
List[A] List
dropRight def dropRight(n : Int)
Returns the list wihout its rightmost n elements [details]
param
n - the number of elements to take
return
- the suffix of length n of the list
List[A] List
dropWhile override def dropWhile(p : (A) => Boolean)
Returns the longest suffix of this list whose first element does not satisfy the predicate p [details]
param
p - the test predicate.
return
- the longest suffix of the list whose first element does not satisfy the predicate p.
List[A] List
endsWith def endsWith[B](that : Seq[B])
[details]
return
- true if this sequence end with that sequence
see
- String.endsWith
Boolean Seq
eq final def eq(arg0 : Object)
This method is used to test whether the argument (arg0) is a reference to the receiver object (this) [details]

The eq method implements an equivalence relation on non-null instances of AnyRef:

  • It is reflexive: for any non-null instance x of type AnyRef, x.eq(x) returns true.
  • It is symmetric: for any non-null instances x and y of type AnyRef, x.eq(y) returns true if and only if y.eq(x) returns true.
  • It is transitive: for any non-null instances x, y, and z of type AnyRef if x.eq(y) returns true and y.eq(z) returns true, then x.eq(z) returns true.
Additionally, the eq method has three other properties.
  • It is consistent: for any non-null instances x and y of type AnyRef, multiple invocations of x.eq(y) consistently returns true or consistently returns false.
  • For any non-null instance x of type AnyRef, x.eq(null) and null.eq(x) returns false.
  • null.eq(null) returns true.

When overriding the equals or hashCode methods, it is important to ensure that their behavior is consistent with reference equality. Therefore, if two objects are references to each other (o1 eq o2), they should be equal to each other (o1 == o2) and they should hash to the same value (o1.hashCode == o2.hashCode).

param
arg0 - the object to compare against this object for reference equality.
return
- true if the argument is a reference to the receiver object; false otherwise.

Boolean AnyRef
equals override def equals(arg0 : Any)
This method is used to compare the receiver object (this) with the argument object (arg0) for equivalence [details]

The default implementations of this method is an equivalence relation:

  • It is reflexive: for any instance x of type Any, x.equals(x) should return true.
  • It is symmetric: for any instances x and y of type Any, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any instances x, y, and z of type AnyRef if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.

If you override this method, you should verify that your implementation remains an equivalence relation. Additionally, when overriding this method it is often necessary to override hashCode to ensure that objects that are "equal" (o1.equals(o2) returns true) hash to the same Int (o1.hashCode.equals(o2.hashCode)).

param
arg0 - the object to compare against this object for equality.
return
- true if the receiver object is equivalent to the argument; false otherwise.

Boolean
equalsWith def equalsWith[B](that : Seq[B])(f : (A, B) => Boolean) Boolean Seq
exists override def exists(p : (A) => Boolean)
Tests the existence in this list of an element that satisfies the predicate p [details]
param
p - the test predicate.
return
- true iff there exists an element in this list that satisfies the predicate p.
Boolean List
filter override final def filter(p : (A) => Boolean)
Returns all the elements of this list that satisfy the predicate p [details]
The order of the elements is preserved. It is guarenteed that the receiver list itself is returned iff all its elements satisfy the predicate `p'. Hence the following equality is valid: (xs filter p) eq xs == xs forall p
param
p - the predicate used to filter the list.
return
- the elements of this list satisfying p.
List[A] List
finalize protected def finalize
This method is called by the garbage collector on the receiver object when garbage collection determines that there are no more references to the object [details]

The details of when and if the finalize method are invoked, as well as the interaction between finalize and non-local returns and exceptions, are all platform dependent.

Unit AnyRef
find override def find(p : (A) => Boolean)
Find and return the first element of the list satisfying a predicate, if any [details]
param
p - the predicate
return
- the first element in the list satisfying p, or None if none exists.
Option[A] List
findIndexOf override def findIndexOf(p : (A) => Boolean)
Returns index of the first element satisying a predicate, or -1 [details]
note
- may not terminate for infinite-sized collections.
param
p - the predicate
return
- the index of the first element satisfying p, or -1 if such an element does not exist
Int Seq
flatMap override final def flatMap[B](f : (A) => Iterable[B])
Applies the given function f to each element of this list, then concatenates the results [details]
param
f - the function to apply on each element.
return
- f(a0) ::: ... ::: f(an) if this list is [a0, ..., an].
List[B] List
flatten def flatten[B](implicit f : (A) => Iterable[B])
Concatenate the elements of this list [details]
The elements of this list should be a Iterables. Note: The compiler might not be able to infer the type parameter.
param
f - An implicit conversion to an Iterable instance.
return
- The concatenation of all elements of iterables in this list.
List[B] List
foldLeft override def foldLeft[B](z : B)(f : (B, A) => B)
Combines the elements of this list together using the binary function f, from left to right, and starting with the value z [details]
return
- f(... (f(f(z, a0), a1) ...), an) if the list is [a0, a1, ..., an].
B List
foldRight override def foldRight[B](z : B)(f : (A, B) => B)
Combines the elements of this list together using the binary function f, from right to left, and starting with the value z [details]
return
- f(a0, f(a1, f(..., f(an, z)...))) if the list is [a0, a1, ..., an].
B List
forall override def forall(p : (A) => Boolean)
Tests if the predicate p is satisfied by all elements in this list [details]
param
p - the test predicate.
return
- true iff all elements of this list satisfy the predicate p.
Boolean List
foreach override final def foreach(f : (A) => Unit)
Apply the given function f to each element of this list (while respecting the order of the elements) [details]
param
f - the treatment to apply to each element.
Unit List
getClass final def getClass
Returns a representation that corresponds to the dynamic class of the receiver object [details]

The nature of the representation is platform dependent.

return
- a representation that corresponds to the dynamic class of the receiver object.

Class[Any] AnyRef
hashCode override def hashCode
Returns a hash code value for the object [details]

The default hashing algorithm is platform dependent. Note that it is allowed for two objects to have identical hash codes (o1.hashCode.equals(o2.hashCode)) yet not be equal (o1.equals(o2) returns false). A degenerate implementation could always return 0. However, it is required that if two objects are equal (o1.equals(o2) returns true) that they have identical hash codes (o1.hashCode.equals(o2.hashCode)). Therefore, when overriding this method, be sure to verify that the behavior is consistent with the equals method.

return
- the hash code value for the object.

Int
indexOf override def indexOf[B >: A](elem : B)
Returns the index of the first occurence of the specified object in this iterable object [details]
note
- may not terminate for infinite-sized collections.
param
elem - element to search for.
return
- the index in this sequence of the first occurence of the specified element, or -1 if the sequence does not contain this element.
Int Seq
indexOf def indexOf[B >: A](that : Seq[B])
Searches for the argument sequence in the receiver object, returning the smallest index where a match occurs [details]
If the receiver object, this, is an infinite sequence this method will not terminate if there is no match. Similarly, if the both the receiver object and the argument, that are infinite sequences this method will not terminate. Because both the receiver object and the argument can both potentially be an infinite sequences, we do not attempt to use an optimized searching algorithm. Therefore, the running time will be proportional to the length of the receiver object and the argument. Subclasses and traits can potentially provide an optimized implementation.
return
- -1 if that not contained in this, otherwise the smallest index where that is found.
see
- String.indexOf
Int Seq
intersect def intersect[B >: A](that : List[B])
Computes the intersection between this list and the given list that [details]
param
that - the list to intersect.
return
- the list of elements contained both in this list and in the given list that.
List[B] List
isDefinedAt def isDefinedAt(x : Int)
Is this partial function defined for the index x? [details]
param
x - ..
return
- true, iff x is a legal sequence index.
Boolean Seq
isInstanceOf final def isInstanceOf[T0]
This method is used to test whether the dynamic type of the receiver object is T0 [details]

Note that the test result of the test is modulo Scala's erasure semantics. Therefore the expression 1.isInstanceOf[String] will return false, while the expression List(1).isInstanceOf[List[String]] will return true. In the latter example, because the type argument is erased as part of compilation it is not possible to check whether the contents of the list are of the requested typed.

return
- true if the receiver object is an instance of erasure of type T0; false otherwise.
Boolean Any
lastIndexOf def lastIndexOf[B >: A](elem : B)
Returns the index of the last occurence of the specified element in this sequence, or -1 if the sequence does not contain this element [details]
param
elem - element to search for.
return
- the index in this sequence of the last occurence of the specified element, or -1 if the sequence does not contain this element.
Int Seq
lengthCompare override def lengthCompare(l : Int)
Result of comparing length with operand l [details]
returns x where x < 0 iff this.length < l x == 0 iff this.length == l x > 0 iff this.length > that. This method is used by matching streams against right-ignoring (...,_*) patterns. This method does not call List.length, it works for O(l), not for O(length).
Int List
map override final def map[B](f : (A) => B)
Returns the list resulting from applying the given function f to each element of this list [details]
param
f - function to apply to each element.
return
- [f(a0), ..., f(an)] if this list is [a0, ..., an].
List[B] List
mkString def mkString(start : String, sep : String, end : String)
Returns a string representation of this iterable object [details]
The resulting string begins with the string start and is finished by the string end. Inside, the string representations of elements (w.r.t. the method toString()) are separated by the string sep.
ex
- List(1, 2, 3).mkString("(", "; ", ")") = "(1; 2; 3)"
note
- Will not terminate for infinite-sized collections.
param
sep - separator string.
start - starting string.
end - ending string.
return
- a string representation of this iterable object.
String Iterable
mkString def mkString(sep : String)
Returns a string representation of this iterable object [details]
The string representations of elements (w.r.t. the method toString()) are separated by the string sep.
note
- Will not terminate for infinite-sized collections.
param
sep - separator string.
return
- a string representation of this iterable object.
String Iterable
ne final def ne(arg0 : Object)
o [details]
ne(arg0) is the same as !(o.eq(arg0)).

param
arg0 - the object to compare against this object for reference dis-equality.
return
- false if the argument is not a reference to the receiver object; true otherwise.

Boolean AnyRef
notify final def notify
Wakes up a single thread that is waiting on the receiver object's monitor
Unit AnyRef
notifyAll final def notifyAll
Wakes up all threads that are waiting on the receiver object's monitor
Unit AnyRef
orElse def orElse[A1 <: A, B1 >: B](that : PartialFunction[A1, B1]) PartialFunction[A1, B1] PartialFunction
partition override def partition(p : (A) => Boolean)
Partition the list in two sub-lists according to a predicate [details]
param
p - the predicate on which to partition
return
- a pair of lists: the list of all elements which satisfy p and the list of all elements which do not. The relative order of the elements in the sub-lists is the same as in the original list.
(List[A], List[A]) List
productElement override def productElement(arg0 : Int)
for a product A(x_1, [details]
..,x_k), returns x_(n+1) for 0 <= n < k
param
n - the index of the element to return
return
- The element n elements after the first element
Any
reduceLeft override def reduceLeft[B >: A](f : (B, A) => B)
Combines the elements of this list together using the binary operator op, from left to right [details]
param
op - The operator to apply
return
- op(... op(a0,a1), ..., an) if the list has elements a0, a1, ..., an.
throws
Predef.UnsupportedOperationException - if the list is empty.
B List
reduceRight override def reduceRight[B >: A](f : (A, B) => B)
Combines the elements of this list together using the binary operator op, from right to left [details]
param
op - The operator to apply
return
- a0 op (... op (an-1 op an)...) if the list has elements a0, a1, ..., an.
throws
Predef.UnsupportedOperationException - if the list is empty.
B List
remove def remove(p : (A) => Boolean)
Removes all elements of the list which satisfy the predicate p [details]
This is like filter with the predicate inversed.
param
p - the predicate to use to test elements
return
- the list without all elements which satisfy p
List[A] List
reverseMap def reverseMap[B](f : (A) => B)
Apply a function to all the elements of the list, and return the reversed list of results [details]
This is equivalent to a call to map followed by a call to reverse, but more efficient.
param
f - the function to apply to each elements.
return
- the reversed list of results.
List[B] List
reverse_::: def reverse_:::[B >: A](prefix : List[B])
Reverse the given prefix and append the current list to that [details]
This function is equivalent to an application of reverse on the prefix followed by a call to :::, but more efficient (and tail recursive).
param
prefix - the prefix to reverse and then prepend
return
- the concatenation of the reversed prefix and the current list.
List[B] List
sameElements def sameElements[B >: A](that : Iterable[B])
Checks if the other iterable object contains the same elements [details]
note
- will not terminate for infinite-sized collections.
param
that - the other iterable object
return
- true, iff both iterable objects contain the same elements.
Boolean Iterable
slice override def slice(start : Int, end : Int)
Returns the list with elements belonging to the given index range [details]
param
end - the end position (exclusive) of the list slice.
start - the start position of the list slice.
return
- the list with elements belonging to the given index range.
List[A] List
slice def slice(from : Int)
A sub-sequence starting at index from and extending up to the length of the current sequence (non-strict) [details]
deprecated
- Use drop(n: Int): Seq[A] instead.
param
from - The index of the first element of the slice
throws
IndexOutOfBoundsException - if from < 0
Seq[A] Seq
sort def sort(lt : (A, A) => Boolean)

Sort the list according to the comparison function <(e1: a, e2: a) => Boolean, which should be true iff e1 is smaller than e2.

[details]
ex
-
      List("Steve", "Tom", "John", "Bob")
        .sort((e1, e2) => (e1 compareTo e2) < 0) =
      List("Bob", "John", "Steve", "Tom")
param
lt - the comparison function
return
- a list sorted according to the comparison function <(e1: a, e2: a) => Boolean.
List[A] List
span def span(p : (A) => Boolean)
Returns the longest prefix of the list whose elements all satisfy the given predicate, and the rest of the list [details]
param
p - the test predicate
return
- a pair consisting of the longest prefix of the list whose elements all satisfy p, and the rest of the list.
(List[A], List[A]) List
splitAt def splitAt(n : Int)
Split the list at a given point and return the two parts thus created [details]
param
n - the position at which to split
return
- a pair of lists composed of the first n elements, and the other elements.
(List[A], List[A]) List
startsWith def startsWith[B](that : Seq[B], offset : Int)
Checks whether the argument sequence is contained at the specified index within the receiver object [details]
If the both the receiver object, this and the argument, that are infinite sequences this method may not terminate.
return
- true if that is contained in this, at the specified index, otherwise false
see
- String.startsWith
Boolean Seq
startsWith def startsWith[B](that : Seq[B])
Check whether the receiver object starts with the argument sequence [details]
return
- true if that is a prefix of this, otherwise false
see
- Seq.startsWith
Boolean Seq
subseq def subseq(from : Int, end : Int)
Returns a subsequence starting from index from consisting of len elements [details]
deprecated
- use slice instead
Seq[A] Seq
synchronized final def synchronized[T0](arg0 : T0) T0 AnyRef
take override def take(n : Int)
Returns the n first elements of this list, or else the whole list, if it has less than n elements [details]
param
n - the number of elements to take.
return
- the n first elements of this list.
List[A] List
takeRight def takeRight(n : Int)
Returns the rightmost n elements from this list [details]
param
n - the number of elements to take
return
- the suffix of length n of the list
List[A] List
takeWhile override def takeWhile(p : (A) => Boolean)
Returns the longest prefix of this list whose elements satisfy the predicate p [details]
param
p - the test predicate.
return
- the longest prefix of this list whose elements satisfy the predicate p.
List[A] List
toArray override def toArray[B >: A]
Converts this sequence to a fresh Array with length elements
Array[B] Seq
toString override def toString
Returns a string representation of the object [details]

The default representation is platform dependent.

return
- a string representation of the object.

String Collection
union def union[B >: A](that : List[B])
Computes the union of this list and the given list that [details]
param
that - the list of elements to add to the list.
return
- a list without doubles containing the elements of this list and those of the given list that.
List[B] List
wait final def wait(arg0 : Long, arg1 : Int) Unit AnyRef
wait final def wait(arg0 : Long) Unit AnyRef
wait final def wait Unit AnyRef
zip def zip[B](that : List[B])
Returns a list formed from this list and the specified list that by associating each element of the former with the element at the same position in the latter [details]
If one of the two lists is longer than the other, its remaining elements are ignored.
return
- List((a0,b0), ..., (amin(m,n),bmin(m,n))) when List(a0, ..., am) zip List(b0, ..., bn) is invoked.
List[(A, B)] List
zipAll def zipAll[B, C >: A, D >: B](that : List[B], thisElem : C, thatElem : D)
Returns a list formed from this list and the specified list that by associating each element of the former with the element at the same position in the latter [details]
param
thisElem - element thisElem is used to fill up the resulting list if the self list is shorter than that
thatElem - element thatElem is used to fill up the resulting list if that is shorter than the self list
that - list that may have a different length as the self list.
return
- List((a0,b0), ..., (an,bn), (elem,bn+1), ..., {elem,bm}) when [a0, ..., an] zip [b0, ..., bm] is invoked where m > n.
List[(C, D)] List
zipWithIndex def zipWithIndex
Returns a list that pairs each element of this list with its index, counting from 0 [details]
return
- the list List((a0,0), (a1,1), ...) where ai are the elements of this list.
List[(A, Int)] List