Understanding the impact of collection contracts on design

5Citations
Citations of this article
1Readers
Mendeley users who have this article in their library.
Get full text

Abstract

Java provides a specification for a user-defined general purpose equivalence operator for objects, but collections such as Set have more stringent requirements. This inconsistency breaks polymorphism: programmers must take care to follow Set's contract rather than the more general Object contract if their object could enter a Set. We have dynamically profiled 30 Java applications to better understand the way programmers design their objects, to determine whether they program with collections in mind. Our results indicate that objects which enter collections behave very differently to objects which do not. Our findings should help developers understand the impact of design choices they make, and guide future language designers when adding support for collections and/or equality. © 2010 Springer-Verlag.

Cite

CITATION STYLE

APA

Nelson, S., Pearce, D. J., & Noble, J. (2010). Understanding the impact of collection contracts on design. In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) (Vol. 6141 LNCS, pp. 61–78). https://doi.org/10.1007/978-3-642-13953-6_4

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free