Interface MergeAndCopyStructure<T extends MergeAndCopyStructure<T>>
- Type Parameters:
T- the type of object that can be copied or merged into this object
- All Known Implementing Classes:
KeyStructure,RangeStructure,ResultStructure,TwoColumnRangeStructure,UniqueResultStructure
public interface MergeAndCopyStructure<T extends MergeAndCopyStructure<T>>
Defines the ability to merge or copy other objects into this
MergeAndCopyStructure. Used
for data structures.
An example of the use of this interface are the subclasses of SearchStructure. They are
defined to be mergeable with objects of the same class (or at least similar classes).
-
Method Summary
-
Method Details
-
merge
Merging adds the contents of the otherMergable to this object. This object then contains the combined content. The other object remains unchanged.Merging aSearchStructuredeletes no content, instead equal values are being merged recursively.- Parameters:
otherMergeable- The object that should be merged into this object
-
copy
T copy()This method copies the object which calls it. The newly created object has the same properties like the object callingcopy().- Returns:
- T that is a copy of the calling object
-