Interface ABAProblemDetector.AgentSlot.SlotSwap

Enclosing class:
ABAProblemDetector.AgentSlot
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface ABAProblemDetector.AgentSlot.SlotSwap
Compares and swaps a reference slot named as ABAProblemDetector.AgentSlot.SlotRead names it.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    swap(Object holder, @Nullable Object selector, int index, @Nullable Object expected, @Nullable Object update)
     
  • Method Details

    • swap

      boolean swap(Object holder, @Nullable Object selector, int index, @Nullable Object expected, @Nullable Object update)
      Parameters:
      holder - the object or array holding the slot
      selector - the updater or handle that reaches it, or null for an element
      index - the element's index, or 0
      expected - the reference the slot must hold
      update - the reference to store
      Returns:
      whether it swapped