Multitudes of Objects: First Implementation and Case Study for Java

By: Friedrich Steimann, Jesper Öqvist, Görel Hedin

Abstract

In object-oriented programs, the relationship of an object to many objects is usually implemented using indirection through a collection. This is in contrast to a relationship to one object, which is usually implemented directly. However, using collections for relationships to many objects does not only mean that accessing the related objects always requires accessing the collection first, it also presents a lurking maintenance problem that manifests itself when a relationship needs to be changed from to-one to to-many or vice versa. Continuing our prior work on fixing this problem, we show how we have extended the Java 7 programming language with multiplicities, that is, with expressions that evaluate to a number of objects not wrapped in a container, and report on the experience we have gathered using these multiplicities in a case study.

Keywords

object oriented programming

Cite as:

Friedrich Steimann, Jesper Öqvist, Görel Hedin, “Multitudes of Objects: First Implementation and Case Study for Java”, Journal of Object Technology, Volume 13, no. 5 (November 2014), pp. 1:1-33, doi:10.5381/jot.2014.13.5.a1.

PDF | DOI | BiBTeX | Tweet this | Post to CiteULike | Share on LinkedIn

The JOT Journal   |   ISSN 1660-1769   |   DOI 10.5381/jot   |   AITO   |   Open Access   |    Contact