Chapter 17. Type Parameters

Topics in This Chapter image

17.1 Generic Classes — page 232

17.2 Generic Functions — page 232

17.3 Bounds for Type Variables — page 232

17.4 View Bounds — page 234

17.5 Context Bounds — page 234

17.6 The Manifest Context Bound — page 235

17.7 Multiple Bounds — page 235

17.8 Type Constraints image — page 236

17.9 Variance — page 237

17.10 Co- and Contravariant Positions — page 238

17.11 Objects Can’t Be Generic — page 240

17.12 Wildcards — page 241

Exercises — page 241

In Scala, you can use type parameters ...

Get Scala for the Impatient now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.