swarm.defobj
Interface Copy

All Known Subinterfaces:
ActionGroup, ActivationOrder, Array, Collection, CompoundAction, ConcurrentGroup, ConcurrentSchedule, KeyedCollection, List, Map, Permutation, Schedule, String
All Known Implementing Classes:
StringImpl

public interface Copy

Copy all state defined as part of object.. An object type that supplies the copy operation defines what it includes as the contents of an object copied. There is no global rule for what is considered "inside" a copied object vs. merely referenced by it. (There is no fixed notion of "shallow" vs. "deep" copy found in some object libraries.) After copying, the new object may still contain some references to other elements also referenced by the starting object, but in general the new object minimizes any dependencies shared with the starting object. Any object type supplying the copy message should also supply documentation on its rules for copied objects.


Method Summary
 java.lang.Object copy(Zone aZone)
          The copy message creates a new object that has the same contents and resulting behavior as a starting object, except that an independent copy of the contents of the starting object is created so that further changes to one object do not affect the other.
 

Method Detail

copy

public java.lang.Object copy(Zone aZone)
The copy message creates a new object that has the same contents and resulting behavior as a starting object, except that an independent copy of the contents of the starting object is created so that further changes to one object do not affect the other. The zone argument specifies the source of storage for the new object. The message returns the id of the new object created.