Choosing Efficient Inheritance Patterns for Java Generics

Free registration required

Executive Summary

Java generic types allow a programmer to create parameterized data structures and methods. For instance, a generic Stack type may be used for integers in one instance and for strings in another. Java compiler guarantees in this case that integers and strings are not mixed in the same stack. The authors study runtime efficiency of a certain inheritance pattern related to Java generic types: narrowing of a type bound. This pattern takes place when a generic type allows a more restricted type of elements than its supertype.

  • Format: PDF
  • Size: 158.7 KB