final class ArrayOps[A] extends AnyVal
This class serves as a wrapper for Array
s with many of the operations found in
indexed sequences. Where needed, instances of arrays are implicitly converted
into this class. There is generally no reason to create an instance explicitly or use
an ArrayOps
type. It is better to work with plain Array
types instead and rely on
the implicit conversion to ArrayOps
when calling a method (which does not actually
allocate an instance of ArrayOps
because it is a value class).
Neither Array nor
ArrayOps are proper collection types
(i.e. they do not extend
Iterable or even
IterableOnce).
WrappedArray and
ImmutableArray serve this purpose.
The difference between this class and WrappedArray
and ImmutableArray
is that calling
transformer methods such as filter
and map
will yield an array, whereas a WrappedArray
will remain a WrappedArray
.
- A
type of the elements contained in this array.
- Source
- ArrayOps.scala
- Since
2.8
- Alphabetic
- By Inheritance
- ArrayOps
- AnyVal
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
Test two objects for inequality.
Test two objects for inequality.
- returns
true
if !(this == that), false otherwise.
- Definition Classes
- Any
-
final
def
##(): Int
Equivalent to
x.hashCode
except for boxed numeric types andnull
.Equivalent to
x.hashCode
except for boxed numeric types andnull
. For numerics, it returns a hash value which is consistent with value equality: if two value type instances compare as true, then ## will produce the same hash value for each of them. Fornull
returns a hashcode wherenull.hashCode
throws aNullPointerException
.- returns
a hash value consistent with ==
- Definition Classes
- Any
-
def
+(other: String): String
- Implicit
- This member is added by an implicit conversion from ArrayOps[A] to any2stringadd[ArrayOps[A]] performed by method any2stringadd in scala.Predef.
- Definition Classes
- any2stringadd
-
final
def
++[B >: A](xs: Iterable[B])(implicit arg0: ClassTag[B]): Array[B]
- Annotations
- @inline()
-
final
def
++:[B >: A](prefix: Iterable[B])(implicit arg0: ClassTag[B]): Array[B]
- Annotations
- @inline()
-
final
def
+:[B >: A](x: B)(implicit arg0: ClassTag[B]): Array[B]
- Annotations
- @inline()
-
def
->[B](y: B): (ArrayOps[A], B)
- Implicit
- This member is added by an implicit conversion from ArrayOps[A] to ArrowAssoc[ArrayOps[A]] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @inline()
-
final
def
:+[B >: A](x: B)(implicit arg0: ClassTag[B]): Array[B]
- Annotations
- @inline()
-
final
def
:++[B >: A](suffix: Iterable[B])(implicit arg0: ClassTag[B]): Array[B]
- Annotations
- @inline()
-
final
def
==(arg0: Any): Boolean
Test two objects for equality.
Test two objects for equality. The expression
x == that
is equivalent toif (x eq null) that eq null else x.equals(that)
.- returns
true
if the receiver object is equivalent to the argument;false
otherwise.
- Definition Classes
- Any
-
def
appended[B >: A](x: B)(implicit arg0: ClassTag[B]): Array[B]
A copy of this array with an element appended.
-
def
appendedAll[B >: A](suffix: Iterable[B])(implicit arg0: ClassTag[B]): Array[B]
A copy of this array with all elements of a collection appended.
-
final
def
asInstanceOf[T0]: T0
Cast the receiver object to be of type
T0
.Cast the receiver object to be of type
T0
.Note that the success of a cast at runtime is modulo Scala's erasure semantics. Therefore the expression
1.asInstanceOf[String]
will throw aClassCastException
at runtime, while the expressionList(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 type.- returns
the receiver object.
- Definition Classes
- Any
- Exceptions thrown
ClassCastException
if the receiver object is not an instance of the erasure of typeT0
.
-
def
collect[B](f: PartialFunction[A, B])(implicit arg0: ClassTag[B]): Array[B]
Builds a new array by applying a partial function to all elements of this array on which the function is defined.
Builds a new array by applying a partial function to all elements of this array on which the function is defined.
- B
the element type of the returned array.
- returns
a new array resulting from applying the given partial function
pf
to each element on which it is defined and collecting the results. The order of the elements is preserved.
-
final
def
concat[B >: A](suffix: Iterable[B])(implicit arg0: ClassTag[B]): Array[B]
- Annotations
- @inline()
-
def
diff(that: Seq[_ >: A]): Array[A]
Computes the multiset difference between this array and another sequence.
Computes the multiset difference between this array and another sequence.
- that
the sequence of elements to remove
- returns
a new array which contains all elements of this array except some of occurrences of elements that also appear in
that
. If an element valuex
appears n times inthat
, then the first n occurrences ofx
will not form part of the result, but any following occurrences will.
-
def
distinct: Array[A]
Selects all the elements of this array ignoring the duplicates.
Selects all the elements of this array ignoring the duplicates.
- returns
a new array consisting of all the elements of this array without duplicates.
-
def
distinctBy[B](f: (A) ⇒ B): Array[A]
Selects all the elements of this array ignoring the duplicates as determined by
==
after applying the transforming functionf
.Selects all the elements of this array ignoring the duplicates as determined by
==
after applying the transforming functionf
.- B
the type of the elements after being transformed by
f
- f
The transforming function whose result is used to determine the uniqueness of each element
- returns
a new array consisting of all the elements of this array without duplicates.
-
def
drop(n: Int): Array[A]
The rest of the array without its
n
first elements. -
def
dropRight(n: Int): Array[A]
The rest of the array without its
n
last elements. -
def
dropWhile(p: (A) ⇒ Boolean): Array[A]
Drops longest prefix of elements that satisfy a predicate.
Drops longest prefix of elements that satisfy a predicate.
- p
The predicate used to test elements.
- returns
the longest suffix of this array whose first element does not satisfy the predicate
p
.
-
def
ensuring(cond: (ArrayOps[A]) ⇒ Boolean, msg: ⇒ Any): ArrayOps[A]
- Implicit
- This member is added by an implicit conversion from ArrayOps[A] to Ensuring[ArrayOps[A]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: (ArrayOps[A]) ⇒ Boolean): ArrayOps[A]
- Implicit
- This member is added by an implicit conversion from ArrayOps[A] to Ensuring[ArrayOps[A]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean, msg: ⇒ Any): ArrayOps[A]
- Implicit
- This member is added by an implicit conversion from ArrayOps[A] to Ensuring[ArrayOps[A]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
ensuring(cond: Boolean): ArrayOps[A]
- Implicit
- This member is added by an implicit conversion from ArrayOps[A] to Ensuring[ArrayOps[A]] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
-
def
exists(f: (A) ⇒ Boolean): Boolean
Tests whether a predicate holds for at least one element of this array.
Tests whether a predicate holds for at least one element of this array.
- returns
true
if the given predicatep
is satisfied by at least one element of this array, otherwisefalse
-
def
filter(p: (A) ⇒ Boolean): Array[A]
Selects all elements of this array which satisfy a predicate.
Selects all elements of this array which satisfy a predicate.
- p
the predicate used to test elements.
- returns
a new array consisting of all elements of this array that satisfy the given predicate
p
.
-
def
filterNot(p: (A) ⇒ Boolean): Array[A]
Selects all elements of this array which do not satisfy a predicate.
Selects all elements of this array which do not satisfy a predicate.
- returns
a new array consisting of all elements of this array that do not satisfy the given predicate
pred
.
-
def
find(f: (A) ⇒ Boolean): Option[A]
Finds the first element of the array satisfying a predicate, if any.
Finds the first element of the array satisfying a predicate, if any.
- returns
an option value containing the first element in the array that satisfies
p
, orNone
if none exists.
- def flatMap[BS, B](f: (A) ⇒ BS)(implicit asIterable: (BS) ⇒ Iterable[B], m: ClassTag[B]): Array[B]
-
def
flatMap[B](f: (A) ⇒ IterableOnce[B])(implicit arg0: ClassTag[B]): Array[B]
Builds a new array by applying a function to all elements of this array and using the elements of the resulting collections.
Builds a new array by applying a function to all elements of this array and using the elements of the resulting collections.
- B
the element type of the returned array.
- f
the function to apply to each element.
- returns
a new array resulting from applying the given collection-valued function
f
to each element of this array and concatenating the results.
-
def
flatten[B](implicit asIterable: (A) ⇒ Iterable[B], m: ClassTag[B]): Array[B]
Flattens a two-dimensional array by concatenating all its rows into a single array.
Flattens a two-dimensional array by concatenating all its rows into a single array.
- B
Type of row elements.
- asIterable
A function that converts elements of this array to rows - Iterables of type
B
.- returns
An array obtained by concatenating rows of this array.
-
def
foldLeft[B](z: B)(op: (B, A) ⇒ B): B
Applies a binary operator to a start value and all elements of this array, going left to right.
Applies a binary operator to a start value and all elements of this array, going left to right.
- B
the result type of the binary operator.
- z
the start value.
- op
the binary operator.
- returns
the result of inserting
op
between consecutive elements of this array, going left to right with the start valuez
on the left:op(...op(z, x_1), x_2, ..., x_n)
where
x1, ..., xn
are the elements of this array. Returnsz
if this array is empty.
-
def
foldRight[B](z: B)(op: (A, B) ⇒ B): B
Applies a binary operator to all elements of this array and a start value, going right to left.
Applies a binary operator to all elements of this array and a start value, going right to left.
- B
the result type of the binary operator.
- z
the start value.
- op
the binary operator.
- returns
the result of inserting
op
between consecutive elements of this array, going right to left with the start valuez
on the right:op(x_1, op(x_2, ... op(x_n, z)...))
where
x1, ..., xn
are the elements of this array. Returnsz
if this array is empty.
-
def
forall(f: (A) ⇒ Boolean): Boolean
Tests whether a predicate holds for all elements of this array.
Tests whether a predicate holds for all elements of this array.
- returns
true
if this array is empty or the given predicatep
holds for all elements of this array, otherwisefalse
.
-
def
foreach[U](f: (A) ⇒ U): Unit
Apply
f
to each element for its side effects.Apply
f
to each element for its side effects. Note: [U] parameter needed to help scalac's type inference. -
def
formatted(fmtstr: String): String
Returns string formatted according to given
format
string.Returns string formatted according to given
format
string. Format strings are as forString.format
(@see java.lang.String.format).- Implicit
- This member is added by an implicit conversion from ArrayOps[A] to StringFormat[ArrayOps[A]] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @inline()
-
def
getClass(): Class[_ <: AnyVal]
Returns the runtime class representation of the object.
-
def
groupBy[K](f: (A) ⇒ K): immutable.Map[K, Array[A]]
Partitions this array into a map of arrays according to some discriminator function.
Partitions this array into a map of arrays according to some discriminator function.
- K
the type of keys returned by the discriminator function.
- f
the discriminator function.
- returns
A map from keys to arrays such that the following invariant holds:
(xs groupBy f)(k) = xs filter (x => f(x) == k)
That is, every key
k
is bound to an array of those elementsx
for whichf(x)
equalsk
.
-
def
grouped(size: Int): Iterator[Array[A]]
Partitions elements in fixed size arrays.
Partitions elements in fixed size arrays.
- size
the number of elements per group
- returns
An iterator producing arrays of size
size
, except the last will be less than sizesize
if the elements don't divide evenly.
- See also
scala.collection.Iterator, method
grouped
-
def
head: A
Selects the first element of this array.
Selects the first element of this array.
- returns
the first element of this array.
- Exceptions thrown
NoSuchElementException
if the array is empty.
-
def
headOption: Option[A]
Optionally selects the first element.
Optionally selects the first element.
- returns
the first element of this array if it is nonempty,
None
if it is empty.
-
def
indexWhere(f: (A) ⇒ Boolean, from: Int = 0): Int
Finds index of the first element satisfying some predicate after or at some start index.
Finds index of the first element satisfying some predicate after or at some start index.
- from
the start index
- returns
the index
>= from
of the first element of this array that satisfies the predicatep
, or-1
, if none exists.
-
def
indices: immutable.Range
Produces the range of all indices of this sequence.
Produces the range of all indices of this sequence.
- returns
a
Range
value from0
to one less than the length of this array.
-
def
init: Array[A]
The initial part of the array without its last element.
-
def
intersect(that: Seq[_ >: A]): Array[A]
Computes the multiset intersection between this array and another sequence.
Computes the multiset intersection between this array and another sequence.
- that
the sequence of elements to intersect with.
- returns
a new array which contains all elements of this array which also appear in
that
. If an element valuex
appears n times inthat
, then the first n occurrences ofx
will be retained in the result, but any following occurrences will be omitted.
-
def
isEmpty: Boolean
Tests whether the array is empty.
Tests whether the array is empty.
- returns
true
if the array contains no elements,false
otherwise.
-
final
def
isInstanceOf[T0]: Boolean
Test whether the dynamic type of the receiver object is
T0
.Test whether the dynamic type of the receiver object is
T0
.Note that the result of the test is modulo Scala's erasure semantics. Therefore the expression
1.isInstanceOf[String]
will returnfalse
, while the expressionList(1).isInstanceOf[List[String]]
will returntrue
. 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 specified type.- returns
true
if the receiver object is an instance of erasure of typeT0
;false
otherwise.
- Definition Classes
- Any
- def iterator(): Iterator[A]
-
def
last: A
Selects the last element.
Selects the last element.
- returns
The last element of this array.
- Exceptions thrown
NoSuchElementException
If the array is empty.
-
def
lastOption: Option[A]
Optionally selects the last element.
Optionally selects the last element.
- returns
the last element of this array$ if it is nonempty,
None
if it is empty.
-
def
map[B](f: (A) ⇒ B)(implicit arg0: ClassTag[B]): Array[B]
Builds a new array by applying a function to all elements of this array.
Builds a new array by applying a function to all elements of this array.
- B
the element type of the returned array.
- f
the function to apply to each element.
- returns
a new aray resulting from applying the given function
f
to each element of this array and collecting the results.
- def mapInPlace(f: (A) ⇒ A): Array[A]
-
def
nonEmpty: Boolean
Tests whether the array is not empty.
Tests whether the array is not empty.
- returns
true
if the array contains at least one element,false
otherwise.
-
def
padTo[B >: A](len: Int, elem: B)(implicit arg0: ClassTag[B]): Array[B]
A copy of this array with an element value appended until a given target length is reached.
A copy of this array with an element value appended until a given target length is reached.
- B
the element type of the returned array.
- len
the target length
- elem
the padding value
- returns
a new array consisting of all elements of this array followed by the minimal number of occurrences of
elem
so that the resulting collection has a length of at leastlen
.
-
def
partition(p: (A) ⇒ Boolean): (Array[A], Array[A])
A pair of, first, all elements that satisfy prediacte
p
and, second, all elements that do not. -
def
patch[B >: A](from: Int, other: IterableOnce[B], replaced: Int)(implicit arg0: ClassTag[B]): Array[B]
Returns a copy of this array with patched values.
Returns a copy of this array with patched values. Patching at negative indices is the same as patching starting at 0. Patching at indices at or larger than the length of the original array appends the patch to the end. If more values are replaced than actually exist, the excess is ignored.
- from
The start index from which to patch
- other
The patch values
- replaced
The number of values in the original array that are replaced by the patch.
-
def
prepended[B >: A](x: B)(implicit arg0: ClassTag[B]): Array[B]
A copy of this array with an element prepended.
-
def
prependedAll[B >: A](prefix: Iterable[B])(implicit arg0: ClassTag[B]): Array[B]
A copy of this array with all elements of a collection prepended.
-
def
reverse: Array[A]
Returns a new array with the elements in reversed order.
-
def
reverseIterator(): Iterator[A]
An iterator yielding elements in reversed order.
An iterator yielding elements in reversed order.
Note:
xs.reverseIterator
is the same asxs.reverse.iterator
but implemented more efficiently.- returns
an iterator yielding the elements of this array in reversed order
-
def
size: Int
The size of this array.
-
def
slice(from: Int, until: Int): Array[A]
Selects an interval of elements.
Selects an interval of elements. The returned array is made up of all elements
x
which satisfy the invariant:from <= indexOf(x) < until
- from
the lowest index to include from this array.
- until
the lowest index to EXCLUDE from this array.
- returns
an array containing the elements greater than or equal to index
from
extending up to (but not including) indexuntil
of this array.
-
def
sortBy[B](f: (A) ⇒ B)(implicit ord: math.Ordering[B]): Array[A]
Sorts this array according to the Ordering which results from transforming an implicitly given Ordering with a transformation function.
Sorts this array according to the Ordering which results from transforming an implicitly given Ordering with a transformation function.
- B
the target type of the transformation
f
, and the type where the orderingord
is defined.- f
the transformation function mapping elements to some other domain
B
.- ord
the ordering assumed on domain
B
.- returns
an array consisting of the elements of this array sorted according to the ordering where
x < y
iford.lt(f(x), f(y))
.
- See also
-
def
sortWith(lt: (A, A) ⇒ Boolean): Array[A]
Sorts this array according to a comparison function.
Sorts this array according to a comparison function.
The sort is stable. That is, elements that are equal (as determined by
lt
) appear in the same order in the sorted sequence as in the original.- lt
the comparison function which tests whether its first argument precedes its second argument in the desired ordering.
- returns
an array consisting of the elements of this array sorted according to the comparison function
lt
.
-
def
sorted[B >: A](implicit ord: math.Ordering[B]): Array[A]
Sorts this array according to an Ordering.
Sorts this array according to an Ordering.
The sort is stable. That is, elements that are equal (as determined by
lt
) appear in the same order in the sorted sequence as in the original.- ord
the ordering to be used to compare elements.
- returns
an array consisting of the elements of this array sorted according to the ordering
ord
.
- See also
-
def
splitAt(n: Int): (Array[A], Array[A])
Splits this array into two at a given position.
Splits this array into two at a given position. Note:
c splitAt n
is equivalent to(c take n, c drop n)
.- n
the position at which to split.
- returns
a pair of arrayss consisting of the first
n
elements of this array, and the other elements.
-
def
tail: Array[A]
The rest of the array without its first element.
-
def
take(n: Int): Array[A]
An array containing the first
n
elements of this array. -
def
takeRight(n: Int): Array[A]
An array containing the last
n
elements of this array. -
def
takeWhile(p: (A) ⇒ Boolean): Array[A]
Takes longest prefix of elements that satisfy a predicate.
Takes longest prefix of elements that satisfy a predicate.
- p
The predicate used to test elements.
- returns
the longest prefix of this array whose elements all satisfy the predicate
p
.
- def toIndexedSeq: immutable.IndexedSeq[A]
-
final
def
toSeq: immutable.Seq[A]
- Annotations
- @inline()
-
def
toString(): String
Returns a string representation of the object.
Returns a string representation of the object.
The default representation is platform dependent.
- returns
a string representation of the object.
- Definition Classes
- Any
-
def
transpose[B](implicit asArray: (A) ⇒ Array[B]): Array[Array[B]]
Transposes a two dimensional array.
Transposes a two dimensional array.
- B
Type of row elements.
- asArray
A function that converts elements of this array to rows - arrays of type
B
.- returns
An array obtained by replacing elements of this arrays with rows the represent.
-
def
unzip[A1, A2](implicit asPair: (A) ⇒ (A1, A2), ct1: ClassTag[A1], ct2: ClassTag[A2]): (Array[A1], Array[A2])
Converts an array of pairs into an array of first elements and an array of second elements.
Converts an array of pairs into an array of first elements and an array of second elements.
- A1
the type of the first half of the element pairs
- A2
the type of the second half of the element pairs
- asPair
an implicit conversion which asserts that the element type of this Array is a pair.
- ct1
a class tag for
A1
type parameter that is required to create an instance ofArray[A1]
- ct2
a class tag for
A2
type parameter that is required to create an instance ofArray[A2]
- returns
a pair of Arrays, containing, respectively, the first and second half of each element pair of this Array.
-
def
unzip3[A1, A2, A3](implicit asTriple: (A) ⇒ (A1, A2, A3), ct1: ClassTag[A1], ct2: ClassTag[A2], ct3: ClassTag[A3]): (Array[A1], Array[A2], Array[A3])
Converts an array of triples into three arrays, one containing the elements from each position of the triple.
Converts an array of triples into three arrays, one containing the elements from each position of the triple.
- A1
the type of the first of three elements in the triple
- A2
the type of the second of three elements in the triple
- A3
the type of the third of three elements in the triple
- asTriple
an implicit conversion which asserts that the element type of this Array is a triple.
- ct1
a class tag for T1 type parameter that is required to create an instance of Array[T1]
- ct2
a class tag for T2 type parameter that is required to create an instance of Array[T2]
- ct3
a class tag for T3 type parameter that is required to create an instance of Array[T3]
- returns
a triple of Arrays, containing, respectively, the first, second, and third elements from each element triple of this Array.
-
def
withFilter(p: (A) ⇒ Boolean): ArrayOps.WithFilter[A]
Creates a non-strict filter of this array.
Creates a non-strict filter of this array.
Note: the difference between
c filter p
andc withFilter p
is that the former creates a new array, whereas the latter only restricts the domain of subsequentmap
,flatMap
,foreach
, andwithFilter
operations.- p
the predicate used to test elements.
- returns
an object of class
ArrayOps.WithFilter
, which supportsmap
,flatMap
,foreach
, andwithFilter
operations. All these operations apply to those elements of this array which satisfy the predicatep
.
- val xs: Array[A]
-
def
zip[B](that: Iterable[B]): Array[(A, B)]
Returns an array formed from this array and another iterable collection by combining corresponding elements in pairs.
Returns an array formed from this array and another iterable collection by combining corresponding elements in pairs. If one of the two collections is longer than the other, its remaining elements are ignored.
- B
the type of the second half of the returned pairs
- that
The iterable providing the second half of each result pair
- returns
a new array containing pairs consisting of corresponding elements of this array and
that
. The length of the returned array is the minimum of the lengths of this array andthat
.
-
def
zipWithIndex: Array[(A, Int)]
Zips this array with its indices.
Zips this array with its indices.
- returns
A new array containing pairs consisting of all elements of this array paired with their index. Indices start at
0
.
-
def
→[B](y: B): (ArrayOps[A], B)
- Implicit
- This member is added by an implicit conversion from ArrayOps[A] to ArrowAssoc[ArrayOps[A]] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
This is the documentation for the Scala standard library.
Package structure
The scala package contains core types like
Int
,Float
,Array
orOption
which are accessible in all Scala compilation units without explicit qualification or imports.Notable packages include:
scala.collection
and its sub-packages contain Scala's collections frameworkscala.collection.immutable
- Immutable, sequential data-structures such asVector
,List
,Range
,HashMap
orHashSet
scala.collection.mutable
- Mutable, sequential data-structures such asArrayBuffer
,StringBuilder
,HashMap
orHashSet
scala.collection.concurrent
- Mutable, concurrent data-structures such asTrieMap
scala.concurrent
- Primitives for concurrent programming such asFutures
andPromises
scala.io
- Input and output operationsscala.math
- Basic math functions and additional numeric types likeBigInt
andBigDecimal
scala.sys
- Interaction with other processes and the operating systemscala.util.matching
- Regular expressionsOther packages exist. See the complete list on the right.
Additional parts of the standard library are shipped as separate libraries. These include:
scala.reflect
- Scala's reflection API (scala-reflect.jar)scala.xml
- XML parsing, manipulation, and serialization (scala-xml.jar)scala.collection.parallel
- Parallel collections (scala-parallel-collections.jar)scala.util.parsing
- Parser combinators (scala-parser-combinators.jar)scala.swing
- A convenient wrapper around Java's GUI framework called Swing (scala-swing.jar)Automatic imports
Identifiers in the scala package and the
scala.Predef
object are always in scope by default.Some of these identifiers are type aliases provided as shortcuts to commonly used classes. For example,
List
is an alias forscala.collection.immutable.List
.Other aliases refer to classes provided by the underlying platform. For example, on the JVM,
String
is an alias forjava.lang.String
.