All Packages Class Hierarchy This Package Previous Next Index
RCs are used whenever "bag" like behavior is desired. In OOD terms, select an RC whenever a multiple cardinality by reference relationship exists between classes.
For example, if a given "leg" of a Trip can have any references to number of Reservations, then use an ReferenceCollection. If it needed to have the Reservations "by value" then use a BaseCollection. If it needs to "qualify" them with a name, then use a NamedCollection.
public abstract boolean insertElement(Object element)
object
to insert into the
collection.
boolean
that indicates if the insert was
successful or not. Catastrophic reasons for why the insert failed
should be indicated through a runtime exception or error (and
documented by the implementor).
public abstract void removeElement(Object element)
object
to remove from the
collection.
All Packages Class Hierarchy This Package Previous Next Index