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

    Modifier and Type
    Method
    Description
    This method copies the object which calls it.
    void
    merge(T otherMergeable)
    Merging adds the contents of the otherMergable to this object.
  • Method Details

    • merge

      void merge(T otherMergeable)
      Merging adds the contents of the otherMergable to this object. This object then contains the combined content. The other object remains unchanged.Merging a SearchStructure deletes 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 calling copy().
      Returns:
      T that is a copy of the calling object