org.eclipse.handly.model.adapter

## Class NullContentAdapter

- java.lang.Object
- - org.eclipse.handly.model.adapter.NullContentAdapter

- All Implemented Interfaces:
    IContentAdapter

      public class NullContentAdapter
      extends java.lang.Object
      implements IContentAdapter

  A content adapter that does nothing in terms of actual adaptation: it merely defines identity transformation between all `IElement`s.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static IContentAdapter` | `INSTANCE` The sole instance of the null content adapter.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `IElement` | `adapt(java.lang.Object element)` Returns the `IElement` that corresponds to the given element.
    `java.lang.Object` | `getCorrespondingElement(IElement element)` Returns the element that corresponds to the given `IElement`.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### INSTANCE

          public static final IContentAdapter INSTANCE

      The sole instance of the null content adapter.

  - ### Method Detail

    - #### adapt

          public IElement adapt(java.lang.Object element)

      Description copied from interface: `IContentAdapter`
      Returns the `IElement` that corresponds to the given element.
      Specified by:
        `adapt` in interface `IContentAdapter`
      Parameters:
        `element` - may be `null`
      Returns:
        the corresponding `IElement`, or `null` if none

    - #### getCorrespondingElement

          public java.lang.Object getCorrespondingElement(IElement element)

      Description copied from interface: `IContentAdapter`
      Returns the element that corresponds to the given `IElement`.
      Specified by:
        `getCorrespondingElement` in interface `IContentAdapter`
      Parameters:
        `element` - an `IElement` (may be `null`)
      Returns:
        the corresponding element, or `null` if none

Copyright (c) 2014, 2020 1C-Soft LLC and others. Made available under the Eclipse Public License 2.0