Interface IContentAdapter

All Known Implementing Classes:
DefaultContentAdapter, NullContentAdapter

public interface IContentAdapter
Defines a one-to-one correspondence (bijection) between elements of a Handly-based model and elements of some other model.

For every Object o such that adapt(o) != null, the following must hold:

    o.equals(getCorrespondingElement(adapt(o))

Likewise, for every IElement e such that getCorrespondingElement(e) != null, the following must hold:

    e.equals(adapt(getCorrespondingElement(e))

This interface may be implemented by clients.

  • Method Details

    • adapt

      IElement adapt(Object element)
      Returns the IElement that corresponds to the given element.
      Parameters:
      element - may be null
      Returns:
      the corresponding IElement, or null if none
    • getCorrespondingElement

      Object getCorrespondingElement(IElement element)
      Returns the element that corresponds to the given IElement.
      Parameters:
      element - an IElement (may be null)
      Returns:
      the corresponding element, or null if none