Package org.eclipse.handly.model.impl.support

# Class ElementDelta.Builder

java.lang.Object
org.eclipse.handly.model.impl.support.ElementDelta.Builder

All Implemented Interfaces:
  `IElementDeltaBuilder`

Enclosing class:
  `ElementDelta`

public static class ElementDelta.Builder extends Object implements IElementDeltaBuilder
Builds a tree of `ElementDelta` objects based on elementary changes.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Builder(ElementDelta rootDelta)`
  Constructs a delta tree builder on the given root delta.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ElementDelta.Builder`
  `added(IElement element)`
  Has the same effect as `added(element, 0)`.
  `ElementDelta.Builder`
  `added(IElement element, long flags)`
  Informs this builder that an element has been added.
  `ElementDelta.Builder`
  `addResourceDelta(IElement element, org.eclipse.core.resources.IResourceDelta resourceDelta)`
  Informs this builder about changes to children of the given element's corresponding resource that cannot be described in terms of element deltas.
  `ElementDelta.Builder`
  `changed(IElement element, long flags)`
  Informs this builder that an element has been changed.
  `ElementDelta`
  `getDelta()`
  Returns the root delta instance specified in the constructor.
  `ElementDelta.Builder`
  `markersChanged(IElement element, org.eclipse.core.resources.IMarkerDelta[] markerDeltas)`
  Informs this builder about changes to markers on the given element's corresponding resource.
  `ElementDelta.Builder`
  `movedFrom(IElement movedFromElement, IElement movedToElement)`
  Informs this builder that an element has been removed as it has moved to a new location.
  `ElementDelta.Builder`
  `movedTo(IElement movedToElement, IElement movedFromElement)`
  Informs this builder that an element has been added as it has moved from an old location.
  `ElementDelta.Builder`
  `removed(IElement element)`
  Has the same effect as `removed(element, 0)`.
  `ElementDelta.Builder`
  `removed(IElement element, long flags)`
  Informs this builder that an element has been removed.

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

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

- ## Constructor Details

  - ### Builder

    public Builder(ElementDelta rootDelta)
    Constructs a delta tree builder on the given root delta.
    Parameters:
      `rootDelta` - not `null`

- ## Method Details

  - ### getDelta

    public ElementDelta getDelta()
    Returns the root delta instance specified in the constructor.
    Specified by:
      `getDelta` in interface `IElementDeltaBuilder`
    Returns:
      the root delta instance (never `null`)

  - ### added

    public ElementDelta.Builder added(IElement element)
    Description copied from interface: `IElementDeltaBuilder`
    Has the same effect as `added(element, 0)`.
    Specified by:
      `added` in interface `IElementDeltaBuilder`
    Parameters:
      `element` - the added element (not `null`)
    Returns:
      this builder
    See Also:
      - `IElementDeltaBuilder.added(IElement, long)`

  - ### added

    public ElementDelta.Builder added(IElement element, long flags)
    Description copied from interface: `IElementDeltaBuilder`
    Informs this builder that an element has been added.
    Specified by:
      `added` in interface `IElementDeltaBuilder`
    Parameters:
      `element` - the added element (not `null`)
      `flags` - delta flags
    Returns:
      this builder

  - ### removed

    public ElementDelta.Builder removed(IElement element)
    Description copied from interface: `IElementDeltaBuilder`
    Has the same effect as `removed(element, 0)`.
    Specified by:
      `removed` in interface `IElementDeltaBuilder`
    Parameters:
      `element` - the removed element (not `null`)
    Returns:
      this builder
    See Also:
      - `IElementDeltaBuilder.removed(IElement, long)`

  - ### removed

    public ElementDelta.Builder removed(IElement element, long flags)
    Description copied from interface: `IElementDeltaBuilder`
    Informs this builder that an element has been removed.
    Specified by:
      `removed` in interface `IElementDeltaBuilder`
    Parameters:
      `element` - the removed element (not `null`)
      `flags` - delta flags
    Returns:
      this builder

  - ### changed

    public ElementDelta.Builder changed(IElement element, long flags)
    Description copied from interface: `IElementDeltaBuilder`
    Informs this builder that an element has been changed.
    Specified by:
      `changed` in interface `IElementDeltaBuilder`
    Parameters:
      `element` - the changed element (not `null`)
      `flags` - delta flags
    Returns:
      this builder

  - ### movedFrom

    public ElementDelta.Builder movedFrom(IElement movedFromElement, IElement movedToElement)
    Description copied from interface: `IElementDeltaBuilder`
    Informs this builder that an element has been removed as it has moved to a new location.
    Specified by:
      `movedFrom` in interface `IElementDeltaBuilder`
    Parameters:
      `movedFromElement` - the element before it was moved to its current location (not `null`)
      `movedToElement` - the element in its new location (not `null`)
    Returns:
      this builder

  - ### movedTo

    public ElementDelta.Builder movedTo(IElement movedToElement, IElement movedFromElement)
    Description copied from interface: `IElementDeltaBuilder`
    Informs this builder that an element has been added as it has moved from an old location.
    Specified by:
      `movedTo` in interface `IElementDeltaBuilder`
    Parameters:
      `movedToElement` - the element in its new location (not `null`)
      `movedFromElement` - the element before it was moved to its current location (not `null`)
    Returns:
      this builder

  - ### markersChanged

    public ElementDelta.Builder markersChanged(IElement element, org.eclipse.core.resources.IMarkerDelta[] markerDeltas)
    Description copied from interface: `IElementDeltaBuilder`
    Informs this builder about changes to markers on the given element's corresponding resource.
    Specified by:
      `markersChanged` in interface `IElementDeltaBuilder`
    Parameters:
      `element` - the element with changed markers (not `null`)
      `markerDeltas` - the marker deltas for the element (not `null`, not empty)
    Returns:
      this builder

  - ### addResourceDelta

    public ElementDelta.Builder addResourceDelta(IElement element, org.eclipse.core.resources.IResourceDelta resourceDelta)
    Description copied from interface: `IElementDeltaBuilder`
    Informs this builder about changes to children of the given element's corresponding resource that cannot be described in terms of element deltas.
    Specified by:
      `addResourceDelta` in interface `IElementDeltaBuilder`
    Parameters:
      `element` - the element with a resource change (not `null`)
      `resourceDelta` - the resource delta for the element (not `null`)
    Returns:
      this builder