Scala Library


scala/Array.scala
]
trait
Array0[A]
extends
ArrayLike[A]Method Summary  
override def

drop
(from : Int) : Projection[A]
Returns this sequence without its
n first elements
If this sequence has less than n elements, the empty
sequence is returned. (nonstrict) 
override def

dropWhile
(p : (A) => Boolean) : Projection[A]
Returns the longest suffix of this sequence whose first element
does not satisfy the predicate
p . 
override def

force : Array[A] 
override def

projection
: Projection[A]
returns a projection that can be used to call nonstrict
filter ,
map , and flatMap methods that build projections
of the collection. 
override def

reverse
: Projection[A]
A sequence consisting of all elements of this sequence in reverse order.

override def

slice
(from : Int, until : Int) : Projection[A]
A subsequence starting at index
from
and ending (noninclusive) at index until (nonstrict) 
override def

take
(until : Int) : Projection[A]
Returns a sequence consisting only over the first
n
elements of this sequence, or else the whole sequence, if it has less
than n elements. (nonstrict) 
override def

takeWhile
(p : (A) => Boolean) : Projection[A]
Returns the longest prefix of this sequence whose elements satisfy
the predicate
p . 
Methods inherited from Mutable  
update (abstract), readOnly 
Methods inherited from RandomAccessSeq  
elements, partition, patch, ++, toStream, safeIs 
Methods inherited from Seq  
length (abstract), lengthCompare, size, isEmpty, concat, last, lastOption, first, firstOption, headOption, isDefinedAt, lastIndexOf, findIndexOf, indexOf, map, flatMap, filter, slice, contains, subseq, toArray, toSeq, equalsWith, startsWith, startsWith, endsWith, indexOf, containsSlice 
Methods inherited from Collection  
toString, stringPrefix 
Methods inherited from Iterable  
foreach, forall, exists, find, foldLeft, foldRight, /:, :\, reduceLeft, reduceRight, copyToBuffer, sameElements, toList, mkString, mkString, mkString, addString, addString, addString, copyToArray, hasDefiniteSize 
Methods inherited from PartialFunction  
orElse, andThen 
Methods inherited from Function1  
apply (abstract), compose 
Methods inherited from AnyRef  
getClass, hashCode, equals, clone, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized 
Methods inherited from Any  
==, !=, isInstanceOf, asInstanceOf 
Method Details 
override
def
projection : Projection[A]
filter
,
map
, and flatMap
methods that build projections
of the collection.override
def
slice(from : Int, until : Int) : Projection[A]
from
and ending (noninclusive) at index until
(nonstrict)from 
The index of the first element of the sliceuntil 
The index of the element following the sliceIndexOutOfBoundsException 
if from < 0
or length < from + len

override
def
take(until : Int) : Projection[A]
 Returns a sequence consisting only over the first
n
elements of this sequence, or else the whole sequence, if it has less
than n
elements. (nonstrict)

Parameters
n 
the number of elements to take
Returns
 a possibly projected sequence

override
def
drop(from : Int) : Projection[A]
 Returns this sequence without its
n
first elements
If this sequence has less than n
elements, the empty
sequence is returned. (nonstrict)

Parameters
n 
the number of elements to drop
Returns
 the new sequence

override
def
dropWhile(p : (A) => Boolean) : Projection[A]
 Returns the longest suffix of this sequence whose first element
does not satisfy the predicate
p
.

Parameters
p 
the test predicate.
Returns
 the longest suffix of the sequence whose first element does not satisfy the predicate
p
.

override
def
takeWhile(p : (A) => Boolean) : Projection[A]
 Returns the longest prefix of this sequence whose elements satisfy
the predicate
p
.

Parameters
p 
the test predicate.
Returns
 the longest prefix of this sequence whose elements satisfy the predicate
p
.

override
def
reverse : Projection[A]
 A sequence consisting of all elements of this sequence in reverse order.
Scala Library