-
(minus sign)
--
operator
-=
operator
_ (underscore)
_*
, for arrays, 214
_=
, in setter methods, 66
,
(comma), in identifiers, 150
; (semicolon)
:
(colon)
::
operator, 154
:+=
operator, 191
!
(exclamation mark)
!!
operator, in shell scripts, 122
!=
operator, 153
for types, 323
?
(question mark), in identifiers, 150
?:
operator, 18
???
method, 108
/
(slash)
.
(period), in identifiers, 150
' (backquote)
^
(caret)
~
(tilde)
'
(single quote), "
(double quote), in identifiers, 150
"""
, in regular expressions, 124
()
(parentheses)
[]
(square brackets)
{}
(braces)
@ (at)
$
(dollar sign), in formatted strings, 22
* (asterisk)
*:
operator, 188
**
(backslash), in identifiers, 150
&
(ampersand)
# (number sign)
#::
operator, 203
#&&, #<, #>, #>>, #|, #||
operators (in shell scripts), 123
%
(percent sign)
+
(plus sign)
++ operator
++=
operator
+=
operator
<
(left angle bracket)
← identifier, 150
<<
operator, 7
<=
operator, 153
=
(equal sign)
for types, 323
==
operator, 153
===
, =/=
operators, 153
=>
operator
⇒
identifier, 150
>
(right angle bracket)
>=
operator, 153
>>, >>>
operators, 7
|
(vertical bar)
√ (square root), 150
(alarm clock emoji), 64
0
value, 64
0x prefix, in hexadecimal literals, 5
addString
method
adhocExtensions
object, 104
after
method, 125
aggregate
method
algebraic data types, 224
aliases
andThen method
Annotation
trait, 239
@beanGetter, @beanSetter, 240
@BooleanBeanProperty, 234
@experimental
, 238
@field,
240
@getter
, 240
@native,
236
@nowarn,
239
@Overrides,
99
@param
, 240
@setter,
240
@tailrec,
237
@targetName,
151
@threadUnsafe,
238
@throws,
235
@transient,
235
@uncheckedVariance,
239
@varargs
, 235
@volatile, 236
arguments of, 233
meta-annotations for, 240
order of, 233
append
method
application objects, 81
applyDynamic
method
applyDynamicNamed method
ArrayOps
class, 45
Arrays
class (Java), 47
ArraySeq
class, 45
ArrayStoreException,
270
as
keyword, 91
ASCII characters, 150
asJavaXxx, asScala
Xxx functions (CollectionConverters),
205
asynchronous APIs, 257
auto tupling, 58
AutoCloseable
interface (Java), 132
automatic conversions. See implicit conversions
Await
object, 248
bash
shell, 123
@beanGetter, @beanSetter
annotations, 240
@BeanProperty
annotation, 66
generated methods for, 72
before
method, 125
BigInt
companion object
binary files, reading, 120
binary trees, 54
blocking calls, 248
blocking
keyword, 258
Boolean type, 5
reading, 23
@BooleanBeanProperty
annotation, 234
Breaks
object, break
method, 25
Buffer
class, 334
buffered
method
BufferedInputStream
class (Java), 146
BufferedIterator
trait, 202
Byte
type, 5
C++ programming language
?:
operator in, 18
arrays in, 40
assignments in, 22
construction order in, 106
constructors in, 69
functions in, 27
implicit conversions in, 307
linked lists in, 188
multiple inheritance in, 130
namespaces in, 86
protected fields in, 105
reading files in, 119
statements in, 21
virtual base classes in, 130
cached thread pool, 259
callback hell, 250
call-by-name parameters, 179
case objects, 219
casts, 99
as a partial function, 225
chaining
character sets, 120
characters
circular dependencies, 32
class files, 31
analyzing, 341
class
keyword, 63
class path, 124
abstract types in, 286
annotated, 232
combined with primary constructor, 72
concrete, 137
constructed, for package-level functions, 89
definitions of:
equality checks in, 109
extension methods in, 304
immutable, 7
importing members of, 90
interoperating with Java, 66
linearization of, 139
open, 104
primitive types and, 5
recompiling, 137
type parameters in, 264
visibility of, 64
classOf
method (scala.Predef),
99
ClassTag
trait, 267
close
method
coll
method
collect
method
combinations
method
compareTo
method, 265
compiler
compiler plugin, 232
compile-time errors, 23
CompletableFuture
class (Java), 258
CompletionStage
interface (Java), 247
Component
class (Java), 145
compose
method (Functionl),
177
comprehensions, 27
computations with side effects, 248
concat
method (StringOps),
13
ConcurrentHashMap
class (Java), 186
console
ConstantAnnotation
trait, 240
constants. See values
constructor proxy methods, 80
constructors
constValue
Xxx methods (scala.compiletime),
329
Container
class (Java), 145
contains
method, 52
containsSlice
method
Conversion
class, 306
copy
method (case classes), 220
corresponds
method (Array),
177
count
method
Coursier tool, 124
curried
method, 177
Curry, Haskell Brooks, 176
debugging
decrements, 7
default
statement, 210
definitions, 26
delegate method (Future
object), 256
@deprecatedInheritance, @deprecatedOverriding
annotations, 238
destructuring of tuples, 215
diff
method
directories
do loop, 23
domain-specific languages, 149
dot notation, 7
Double
type, 5
reading, 23
drop, dropWhile
methods
dropRight
method (Iterable),
194
duck typing, 283
Duration
object, 248
Dynamic
trait, 159
dynamically typed languages, 283
DynamicProps
class, 161
Eiffel programming language, 67
EmptyTuple
object, 215
end
method, 125
endsWith
method
eq method (AnyRef), 109
equals method
Equiv
class, 328
error method (scala.compiletime),
325
errors
escape hatch, 150
eta expansion, 171
evidence objects, 312
Executor
interface (Java), 246
Executors
class, 259
exists
method
@experimental
annotation, 238
given
in, 303
expressions
used by compiler, 308
f
prefix, in formatted strings, 22
failed
method
Failure
class, 249
failure
method (Promise)
, 257
fall-through problem, 210
false
value, 64
@field
annotation, 240
fields
files
filterNot
method
find
method
find
XxxIn
methods (Regex),
124
firstCompletedOf
method (Future
object), 256
flatten
method (Future
trait), 254
Float
type, 5
reading, 23
fluent interfaces, 286
fold
method
foldLeft
method, 180
foldRight
method
for case
loop, 218
forall
method
fork-join pool, 258
formatted strings, 22
Fortran programming language, 163
Fraction
companion object, 308
Fractional
class, 328
fragile base class problem, 98
fromOrdinal
method (enumerations), 82
FromString
class, 328
fromString
method (Source),
120
fromTry
method (Future
object), 256
fromURL
method (Source),
120
Function1
trait, 177
functional programming languages, 169
Future
interface (Java), 247
future
method (Promise)
, 257
tasks of:
identifiers, 150
identity functions, 312
IllegalArgumentException, 33
IllegalStateException, 257
immutability, 7
implements keyword, 131
implicit parameters, 14
increments, 7
IndexedSeq
trait, 13, 184, 187
immutable, 186
index
Xxr methods
infix notation
init
method (Iterable),
193
instances, 81
integer literals, 5
interfaces, 130
InterruptedException,
249
intersect
method
intertwining classes and constructors, 100
IOException,
235
isCompleted
method
isDefinedAt
method (PartialFunction),
224
isEmpty method
isFailure
method (Try),
249
IsIterable, IsIterableOnce, IsMap, IsSeq
classes, 328
isSuccess
method (Try),
249
istream::peek
function (C++
), 119
IterableOps
trait, 224
iterator
method (collections)
, 201
Jakarta EE, 232
Java programming language
?:
operator in, 18
assignments in, 22
classes in, 98
closures in, 175
collections in, 185
comparing objects in, 110
completable futures in, 258
ConcurrentHashMap
in, 186
construction order in, 106
constructors in, 69
enumerations in, 82
file processing in, 118
functional (SAM) interfaces in, 175
futures in, 247
generic types in, 272
hashCode
method in, 189
interoperating with Scala:
lambda expressions in, 175
maps in, 185
missing values in, 268
modifiers in, 236
new
operator in, 40
no multiple inheritance in, 130
no operator overloading in, 8
no variance in, 239
null
value in, 108
statements in, 21
superclass constructors in, 101
synchronized
in, 107
toString
method in, 45
try-with-resources
statement in, 36
type checks and casts in, 99
wildcards in, 272
Java AWT library, 145
java.io.BufferedInputStream
class, 146
java.io.PrintWriter
class, 120
java.lang
package, 92
java.lang.AutoCloseable
interface, 132
java.lang.Enum
class, 82
java.lang.Object
class, 107
java.lang.ProcessBuilder
class, 48
java.lang.Throwable
class, 33
java.math.BigX.rx
classes, 6
java.util
package, 205
java.util.Arrays
class, 47
java.util.Comparator
class, 239
java.util.concurrent.CompletableFuture
class, 258
java.util.concurrent.CompletionStage
interface, 247
java.util.concurrent.Executor
interface, 246
java.util.concurrent.Executors
class, 259
java.util.concurrent.Future
interface, 247
java.util.LinkedList
class, 185
java.util.RandomAccess
interface, 185
JavaBeans specification, 145
JavaScript programming language
javax.swing.JTextArea
class, 281
JButton, JComponent
classes (Swing), 145
JDK (Java Development Kit), source code for, 226
JSON
companion object, 331
JSON-B framework, 232
JTextArea
class (Java), 281
JUnit framework, 232
JVM (Java Virtual Machine)
keySet method (Map), 54
last, lastOption
methods (Iterable),
193
lastIndexOf, lastIndexOfSlice
methods
lazy values, 238
lazyZip
method
length
method
lift
method, 126
linearization, 139
LinearSeq
trait, 13
lines, 118
linked hash sets, 190
LinkedHashMap
class, 55
LinkedList
class (Java), 185
List class, 332
list
method (java.nio.file.Files)
, 121
ListBuffer
class, 187
literals, 5
log messages
Logger
trait, 133
Long
type, 5
reading, 23
main
method, 81
mapInPlace
method
Match class, 126
matched
method, 125
Math
class, 8
max
method
maxBy, maxByOption, maxOption
methods
MessageFormat
class (Java), 298
methods
accessor, 65
annotated, 232
as arithmetic operators, 7
clashes of, in sub- and superclasses, 98
co-/contravariant, 312
constructor proxy, 80
declaring, 27
executed lazily, 203
for primary constructor parameters, 72
generic, 264
mutator, 65
misspelled, 98
private, 237
protected, 105
public, 66
return value of, 264
static, 78
used under certain conditions, 268
variable-argument, 235
vs. functions, 171
Meyer, Bertrand, 67
min
method
minBy, minByOption, minOption
methods
mkString
method
ML programming language, 29
multiply
method (Java), 151
Object
class (Java), 107
adding traits to, 133
default methods for, 189
evidence, 312
extending class or trait, 79
extension methods in, 304
extracting values from, 216
given, 298
importing members of, 90
nested, 221
no type parameters for, 271
pattern matching for, 212
testing whether belongs to a given class, 99
variance of, 270
ofDim
method (Array),
46
onComplete, onFailure, onSuccess
methods (Future),
250
open
keyword, 104
ordinal
method (enumerations), 81
orNull method (Option),
268
OutOfMemoryError
, 203
@Overrides
annotation, 99
package objects, 8
package.scala
file, 89
package-level functions, 89
padTo
method
Pair
class, 272
@param
annotation, 240
parameters
partition
method
Pascal programming language, 163
+:
operator and, 192
classes for. See case classes
extractors in, 156
extractors with, 216
failed, 156
for arrays, 214
for maps, 54
for objects, 212
guards in, 211
in for
expressions, 218
not exhaustive, 239
Option
type with, 219
regular expressions in, 216
sealed classes and, 105
vs. type checks and casts, 99
permutations
method
piping, 123
Point
class, 328
Predef
object
prefixLength
method
primitive types, 5
arrays of, 40
printf
function, 120
println
function, 22
PrintWriter
class (Java), 120
PriorityQueue
class, 187
probablePrime
method (BigInt),
9
procedures, 29
Process
object, 123
ProcessBuilder
class (Java), 48
product
method
programs
properties, 65
property change listeners, 145
PushbackInputStreamReader
class (Java), 119
putIfAbsent
method (Map),
186
Python programming language
Queue class, 187
Random
object, 9
RandomAccess
interface (Java), 185
raw
prefix, in formatted strings, 22
raw string syntax, 124
ready method
recursions, 186
reduce
method
reduceLeft
method, 174
reduceRight method
reference types
reflective calls, 282
remove
method (Map),
186
replace
method (Map),
186
result
method
reverse
method
rich interfaces, 133
RichChar
class, 6
_root_
prefix, in package names, 88
Ruby programming language
s
prefix, in formatted strings, 22
Scala programming language
scala.collection
package, 205
scala.collection.concurrent
package, 186
scala.collection.immutable
package, 185
scala.collection.mutable
package, 185
scala.compiletime
package, 64
scala.compiletime.ops.any
package, 323
scala.compiletime.ops.int
package, 323
Scala.js project, 10
scala.language.adhocExtensions
object, 104
scala.language.implicitConversions
class, 307
scala.language.strictEquality
object, 110
scala.sys.process
package, 122
scala.util
package, 9
scalac
program. See compiler
scanLeft
method (ScanLeft),
200
scanRight
method (ScanLeft),
200
segmentLength
method
selectDynamic
method
selectors
methods of, 195
Seq[Char]
class, 13
sequences, 13
with fast random access, 187
Serializable
trait, 121
Set
trait, 184
immutable, 186
@setter
annotation, 240
shadowing rule, 25
Short
type, 5
reading, 23
@showAsInfix
annotation, 264
Singleton
class, 284
singleton objects, 8–9, 78, 286
case objects for, 219
inference of, 323
slice
method
sliding
method
sortBy
method
sorted
method
sorted sets, 190
SortedSet
trait, 184
sortInPlace method (Array),
44
sortWith
method, 174
source files, 89
span
method
splitAt
method
sqrt
method (scala.math),
8
src.zip
file (JDK), 226
Stack
class, 187
stack overflow, 237
standard input, 120
start
method, 125
startsWith
method
statements
StaticAnnotation
trait, 239
stdin
method, 120
strictEquality
object, 110
string interpolation, 22
StringBuilder class, append
method, 58
strings, 6
subclasses
subsetOf
method (BitSet)
, 190
substring
method (String)
, 27
Success
class, 249
success
method (Promise),
257
successful
method (Future
object), 256
sum
method
super
keyword (Java), 101
synchronized
method (AnyRef),
107
synchronous computations, 257
tab completion, 2
tail
method
TailCalls, TailRec
objects, 237
@tailrec
annotation, 237
take, takeWhile
methods
takeRight
method (Iterable),
194
@targetName
annotation, 151
tasks
then
keyword, 18
Thread
class (Java), stop
method, 239
thread pool, 246
threads
@threadUnsafe
annotation, 238
throw
expression, 34
Throwable
class (Java), 33
@throws
annotation, 235
to
method
toArray
method
toBuffer
method
toChar
method (RichInt),
6
toIndexedSeq
method
toIterable, toList methods
toMap
method
toScala
method, 205
toSeq, toSet
methods
toString
method
toVector method
trait
keyword, 131
trampolining, 237
transform, transformWith
methods (Future trait),
254
@transient annotation, 235
transparent keyword, 143
traverse method (Future object), 255
trySuccess
method (Promise),
257
tupled
method, 178
unary_-
method (BigInt),
13
unary_op
methods, 152
@uncheckedVariance
annotation, 239
Unicode characters, 150
uniform access principle, 67
uniform creation principle, 185
uniform return type principle, 194
uninitialized
value, 64
union
method (sets), 190
unit
method (Future
object), 257
universal traits, 112
until
method, 187
until
statement, 179
update
method, 155
updateDynamic
method
updateWith
method (Map),
186
URLs (Uniform Resource Locators)
Using
object, 36
using parameters, 267
val fields, 4
value
method (Future
trait), 248
valueAtOneQuarter
function, 172
valueOf
method (enumerations), 82
values
values
method
van der Linden, Peter, 210
var
fields, 4
varargs, 337
@varargs
annotation, 235
variables
Vector
class, 187
vector
type (C++), 40
view
method
Visual Studio Code, 2
@volatile
annotation, 236