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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.