Procedure Specifications

Representation Independence

Vector v = new Vector();
List l = new List ();
....
v.copyInto (l.elementData);
class List {
  public Entry getEntry (int i);
}

//we can now write

Entry e = l.getEntry (i);
e.element = x;
...
e.element = y;

José M. Vidal .

15 of 16