org.eclipse.handly.ui.workingset

## Class AbstractWorkingSetUpdater.WorkingSetDelta

- java.lang.Object
- - org.eclipse.handly.ui.workingset.AbstractWorkingSetUpdater.WorkingSetDelta

- Enclosing class:
    AbstractWorkingSetUpdater

      protected static class AbstractWorkingSetUpdater.WorkingSetDelta
      extends java.lang.Object

  Utility class used to help process element change events. The content of a working set can be updated by creating, modifying, and applying a working set delta. When a working set delta is created, it is initialized with a copy of the content of its underlying working set.

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `indexOf(java.lang.Object element)` Returns the index of the first occurrence of the given element in this delta, or -1 if this delta does not contain the element.
    `void` | `remove(int index)` Removes the element at the given index in this delta.
    `void` | `set(int index, org.eclipse.core.runtime.IAdaptable element)` Replaces the element at the given index in this delta with the given element.

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

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

- - ### Method Detail

    - #### indexOf

          public int indexOf(java.lang.Object element)

      Returns the index of the first occurrence of the given element in this delta, or -1 if this delta does not contain the element.
      Parameters:
        `element` - the element to search for
      Returns:
        the index of the first occurrence of the given element in this delta, or -1 if this delta does not contain the element

    - #### set

          public void set(int index,
                          org.eclipse.core.runtime.IAdaptable element)

      Replaces the element at the given index in this delta with the given element.
      Parameters:
        `index` - the index of the element to replace
        `element` - the element to be stored at the given index (not `null`)
      Throws:
        `java.lang.IndexOutOfBoundsException` - if the index is out of range

    - #### remove

          public void remove(int index)

      Removes the element at the given index in this delta. Shifts any subsequent elements to the left (subtracts one from their indices).
      Parameters:
        `index` - the index of the element to be removed
      Throws:
        `java.lang.IndexOutOfBoundsException` - if the index is out of range

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